Implement timers (setTimeout/setInterval) for workers

Closes issue #3236