Improved the algorithm for verifying if script classes require garbage collection


git-svn-id: http://svn.code.sf.net/p/angelscript/code@2032 404ce1b2-830e-0410-a2e2-b09542c77caf