Prevent extensions from clobbering all globals.
merged branch drewjw81/extension_global_fix (PR #1053)

This PR was squashed before being merged into the master branch (closes #1053).

Discussion
----------

Prevent extensions from clobbering all globals.

It's possible for a poorly written extension to destroy all global variables by returning nothing.  This prevents that and throws an E_WARNING to notify the developer.

Commits
-------

7c8acf7 Prevent extensions from clobbering all globals.