JSAnalyze.findAssignedGlobals: a simpler analysis for linker.

Includes tests ported from findGlobalDottedRefs. Should add more tests.