Bank of America has agreed to pay US government mortgage agency Fannie Mae $3.6 billion to settle claims relating to…