A new study shows JPMorgan and BofA are winning Wall Street’s technological arms race — and smaller firms may have no choice but to merge to keep up