Prime minister's bid to secure parliament's backing of plan to wring concessions from EU is defeated by majority of 45.