Add `finally` method for deferred execution
core: Add new weak task API