Support owned keyword for delegates called once
Fix memory leak when defining async functions targeting glib < 2.20.

Fixes bug 684182