Deal extricates the lender from one of the last businesses related to its ill-fated push into retail banking