Update to ESR31 beta, StdDerserializer rooting improvements.

Adopts to API changes from the last used mozilla central version to the version which is currently in the beta branch (well, it's a few days old already).
Improves rooting of the script backrefs in StdDeserializer and makes it compatible by implementing a custom trace function.
Fixes a bug that caused function objects to be added to the global object (I've fixed that in SVN too).