Sadiq Khan’s landslide mayoral win showed candidates matter though other factors can change the outcome