Introduce max time for train and run epochs
Does two things:
(a) introduces max time argument, so that the trainer halts after max_time seconds
(b) introduces run epochs, so one can restart the number of steps since the last reset to use in noise etc.
(cherry picked from commit 26c1fe4b)
Co-authored-by: Vojtěch Kůr vojtech.kur@gmail.com