Added long-needed tests for the ActivityMonitor class.

In order to properly test stuff that works with system time, I added some ugly code to the Util class to override the system clock. Better than the alternative, probably :)

Tweaked the build system to use AM_$FLAG appropriately (read: never).