issue 3067 - don't require caller to have curry on Function prototype

Follow the pattern of using a `complete` function within the `internal_api` callbacks so that use of `curry` is confined to the dialog.

This is important in a context like b2g or desktop firefox, where callbacks are handed from the browser to the `internal_api`; they should not need to modify the Function prototype.