Implements Post::Common get_env and get_envs

I think this is required for https://github.com/rapid7/metasploit-framework/pull/2782. 

We shouldn't be using direct meterpreter calls in post modules to try and maintain shell compatibility where possible and adding a layer of abstraction above meterpreter calls.