Fix #35122: Blenderplayer crashes when loading level

Issue was caused by ntreeUpdateTree calling for a ntree
which is not in G.main.

This lead to issues in ntreeVerifyNodes (which is called
from ntreeUpdateTree).

Made is so ntreeUpdateTree now accepts main as an argument.
Will work for the release, later we could either solve the
TODO mentioned in ntreeUpdateTree which will eliminate need
in main there or make it so context's main is used from all
over where ntreeUpdateTree is called (currently there're
still some usages of G.main).

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56526 954f8c5b-7b00-dc11-b283-0030488c597c