Make runningAsSource a global variable (#14015)
Summary of the issue:
NVDA checks in various places if it is running as source.
This check should be abstracted out, as the check is dependent on py2exe behaviour.
When viewing code, it is also not immediately clear what `getattr(sys, 'frozen')` means, whereas a named variable will be clearer.
Description of user facing changes
A named variable with documentation for code contributors.
Description of development approach
Checked what `import sys; getattr(sys, 'frozen', None)` returns in the python console of an installed copy of NVDA and a source copy of NVDA.