Thain Resigns Amid Losses at Bank of America