MPs have struck an eleventh-hour deal over the contentious Afghan detainee documents, averting a constitutional crisis that could have led to a snap election. More...