some cleanings and tweaks

also timeout ids now contains the expiry time and unscheduling a timer
is a log(n) operation and doesn't require creating a new priority queue anymore