ioloop.py: Move fallback code into constructor

Move the fallback comparison based on memory IDs into the
constructor of the _Timeout object to clean up the comparison
functions.