A day of extraordinary behind-the-scenes manoeuvring at Westminster culminated in the bombshell departure of shadow home secretary James Cleverly.