Implemented substitute substitute() to substitute
StringUtil.substitute() which had unexpected behaavior with $ symbols
and functions as parameters due to internal usage of String.replace()
with a regex.  It's also faster than StringUtil.substitute().

Change-Id: I352c4bc1eea96f85f8f2fd99d78688a6ca99272f