Ronnie O’Sullivan’s hopes of a record-equalling seventh Crucible title end with a second-round final-frame loss to Anthony McGill.