[Extension] Enabled registering permissions in XW_Initialize.

There was a dependency loop in registering the permissions during
extension initialization. The permission delegate used by registering
permissions was initialized after constructor, so that we cannot
use the delegate to register permissions in there.
The patch moved the delegate initialization into constructor and
removed the 'set_permissions_delegate' function.
Merge pull request #1608 from mbbill/register_fix

[Extension] Enabled registering permissions in XW_Initialize.