added a periodic worker

The periodic worker will call a function periodically based on an input duration
naked channel ops are risky -- generally, please make sure you stick them in selects, with a timeout chan that can fail.