Performance enhancement

1) Use quicker StringBuilder instead of StringBuffer for local (and, hence, thread-safe by origin) variables
2) Remove unnecessary synchronized sections from environmentSubstitute()

I mostly agree with you on this, but there needs to be a test that includes seriously testing PDI-4587. I recommend first, putting the code back to the original state before svn revision 13897, and replicating PDI-4587 first. Then, change this as described and see if you're still unable to replicate PDI-4587. Without proof one-way or another on this, I wouldn't process this pull request. 

Final note on this - It's completely unclear to me how the wrapper synchronizedMap around the local variable system properties (passed in argument) could in any way prevent mutation to the original map since the original map isn't synchronized.