[JENKINS-25365] - Unit test for the issue

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
[FIXED JENKINS-25365] - Get rid of error-prone regexps in MacroStringHelper

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
JENKINS-25226] - A direct unit test for the issue

The test checks that the variables substitution works properly for build parameters.
The change also refactors the provisioning of PerforceSCM stubs.

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
[FIXED JENKINS-25226] - Resolve environment variables with a highest priority

Other variables (projects, default parameters, etc.) will be used in the case of missing macros.
It should not happen in general, but may appear in buildEnvironment()

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Merge pull request #59 from synopsys-arc-oss/Variables_handling_issues

[FIXED JENKINS-25635,JENKINS-25226] - Variables substitution issues