Wraps a callback to handle a timeout. If the timeout occurs before the callback being called, it either uses the first argument for returning the TimeoutError (Node.JS style) or let it handle by a specialized handler