Added environment variable mem tracker mechanism

Added linked list mechanism to track the memory which was allocated for
setting environment variables to be able to call free() on it when the
program quits.

As @vivien pointed out, the memory in `set_environment_variable()` for
the environment variable needs to be allocated dynamically as the memory
is passed to `putenv()` which needs it to be dynamically allocated.

The `track_env()` function should be used to track a environment
variable. The `cleanup_envs()` function calles `free()` on the
linked list (recursively).