Theresa May has sacked her closest political ally after an investigation into claims that pornographic material was found on his Commons computer.