Labour's Emily Thornberry has suggested that Theresa May should resign if the exit poll proves to be accurate.