The prosecutions brought about by Northern Rail and TransPennine Express were declared null and void during a two-minute court hearing on Thursday