Add timeout wrapper for any callback interface

This solves https://github.com/caolan/async/issues/429#issuecomment-40054121.

Enables timing out a callback interface by wrapping the function and preventing it from being called after it has timed out.