Add a checkpointable timer.

- Extract timer interface. (Timer.java)
- Make existing SimpleTimer implement Timer.
- Add a new checkpointable timer. This keeps track of the difference between system and nano time in order to detect a restart.
Only bother checking the runtime if we have a limit.
Switch to using the checkpointable timer by default.