MODULES-1547 - Strict variable support

Cleaned up code to not use miscellaneous global variables. Converted
code to use the `params` pattern. Added a _very_ basic unit test to make
sure it was compiling with strict variables. Bumped the stdlib
dependency to 4.x so I could do additional validation.