Honour no_proxy environment variable

Read the no_proxy environment variable, and do not run the connection
over the proxy, if it matches an entry in the list.
Corrections to no_proxy support and tests.

- Used unless instead if not
- Changed regular expression, so it filters a leading dot or star
- Make the match case-insensitive
- Created a functions cleanEnv, setupEnv, and restoreEnv,
  to setup an environment for the test.
- Cleaned environment of proxy/no_proxy variables in tests, which failed
no_proxy related cleanup