Rail passengers will be warned if trains or stations are busy, to aid social distancing.