[JENKINS-16028] [JENKINS-18762] Added tests to reproduce JENKINS-16028 (environment variables are not set in maven prebuild), JENKINS-18762 (environment variables are not set when wrapped in another builder).
[FIXED JENKINS-16028] [FIXED JENKINS-18762] Adds EnvAction to hold COPYARTIFACT_BUILD_NUMBER_XXX when it's needed. It was added when a build starts and the build has copyartifact, which doesn't work for maven-project and copyartifacts wrapped in other builders.
Merge pull request #47 from ikedam/feature/JENKINS-16028_EnvActionWhenNeeded

[JENKINS-16028] [JENKINS-18762] Adds EnvAction when it's needed