The lender said it would reduce its dependence on borrowed money, sell its German retail branches on the stock market and shrink its investment bank.