Prevent system time changes from affecting timeouts, other misc changes.

Here are some changes that I have been sitting on for a while. The monotonic clock change was inspired when someone changed the system time on my server backwards a bit ... which caused havoc with the timeouts in my APEServer javascript code. I have had the clock changes running on my production server for about 2 months now, the other changes for over a year.