DEPL-5298 Sorted environments list

Slightly improved version of PR: https://github.com/jenkinsci/deployit-plugin/pull/9
Added envvars resolving for import from location
DEPL-5302 Added some unit tests
DEPL-5302 merge changes