Support more cases in code_xforms (#1996)
* Support more cases in code_xforms
* Support multiple class names and functions to
handle extracting both prediction and training
functions.
* Handle globals referenced in function inputs.
* Handle subclasses referenced in the major class.
* Add test_strip_model_source_code_keeps_referenced_class_from_function
* Confirm that this behaviour is consistent with
functions.
* Fix globals name to global_vars
* Do not collide with global namespace