[debugger] Add tests for FindGlobalVariable.

Adds tests for FindGlobalVariable which were missing before. Does some
cleanup around how this function and the main FindVariable function
interact to make it more easily testable.

Adds a new helper to set up a symbol test environment. I plan to use
this to improve some other tests in a followup.

TEST=this is

Change-Id: I231f92864072467fbb6984a5962705016a7e8eb1
9 files changed