After extensive talks, president and House speaker reach compromise deal that may face opposition from both sides over concessions, as sides race to meet June 5 deadline