Add global overwriting option for extensions.

This allows extensions to overwrite functions and events in a clearly defined manner. Defaults to false to avoid awkward behavior changes, but can be configured in preferences.ini. This change is primarily a global killswitch, but is also in lieu of a more finely grained whitelist system, which will allow overwriting of specific functions and events, which will be introduced in the future.
Fixed boilerplate-test failure.