MPs vote by 308-297 to defeat Theresa May and accept Grieve amendment