Great Western Railway has been fined £1 million for health and safety failings in relation to the death of a passenger.