Migratory birds are arriving in the UK earlier each spring and leaving later each autumn, a study shows.