MPs have approved the programme of laws brought forward by Theresa May's minority Government after a late U-turn on abortion funding averted a potential Commons defeat.