Resolve replay detection logic problem.

The signature replay detection logic was being passed bad drift values
by check(). Instead of passing in the current drift relative to to the
local clock it was getting the delta between the cached drift and the
current signature. This caused failures in the replay check logic when
a client has a drift > +/- 4 seconds.

This patch resolves this by removing the drift value from the replay
check logic entirely. Instead the current timestamp is compared to the
time when the replayed signature was first seen. Additionally this check
has been moved in front of the main signature check to allow a valid
replay to shortcut the rest of the validation.

A new test case was added to the test suite to validate the replay
detection in the face of clock drift.

Additionally replaced the logging mechanism with the python standard
logging library.