Bank of America will pay $108 million to settle federal charges that Countrywide Financial Corp., which it acquired nearly two years ago, collected outsized fees from borrowers facing foreclosure.