[Extension] Enabled permission cache in extension process.

Speed up performance by caching the persistent and session permissions
in the extension process.