Flagstar Bancorp has set aside $161 million to cover lawsuits over its mortgage-underwriting practices.