The bank has agreed to pay hundreds of millions of dollars to former and current female employees to settle a class action lawsuit.