getGlobalsAndPackages function

Retrieves global variables of an expression and their associated packages