LocalController doesn't inherit http proxy settings from command line

Certain tests require the HTTP proxy settings to be
specified in order to function correctly.

In particular, this fixes the GroovyPluginTest when run in a proxied-environment.

[FIXED JENKINS-23326]
How about a private helper method to remove the above duplicated blocks? That method would take both propertyName and properties as params, to add property to properties if non-null.