Make tasks callables

Previously, tasks needed to be functions. Now they may be any object
that implements "call". This will open the possibility of enqueing a
reusable callable object instead of a closure.