ExtensionRegistry clean up

Work oriented toward ensuring the ExtensionRegistry is put into a correct state when ops that modify it fail.

Primary JIRA is WFCORE-21; the other work is general cleanup of how this class works and is used.