Changes worker perform callback API.

Changes the complete and perform callbacks to match typical node style.
Removes the need of using 'instanceof'.

Fixes #7