[Extensions] Support for persistent callback

Persistent callback are used in the Internal Extensions for implementing EventTargets. The callback is set only once and can be called from the native side multiple times.