Added tests for serialization / deserialization.

Fixed an issue where countdown timers would gradually become completely incorrect after deserialization. Countdown timers will now stay put when deserialized, instead of seeming to have counted down in the background. We update the duration countdown between application runs with sleep detection in ActivityMonitor.