Make PeriodicThread more regular

Right now, PeriodicThread will sleep the full duration of the interval
regardless of how long the target function takes to complete. This can make the
queue back up precipitously during high load. Mitigate this by subtracting the
run-time of the target function from the sleep interval.

Change-Id: Ib746a2571ea25058de49caeae9aad83ec4c32157