[Extensions] Invalidate exposed functions when the extension module is destroyed

The crash identified back when doing our Chromium update could not be
reproduced. This commit also adds a test. Without the change, RP would
crash in the test. With the change, RP doesn't crash anymore.

TEST=XWalkExtensionsIFrameTest.KeepingReferenceToFunctionFromDestroyedIFrame
BUG=https://crosswalk-project.org/jira/browse/XWALK-184
Merge pull request #1452 from tmpsantos/crosswalk-3_raw_sockets_fix

[Extensions] Invalidate exposed functions when the extension module is destroyed