Implemented substitute substitute() to substitute StringUtil.substitute() which had unexpected behavior with $ symbols and functions as parameters due to internal usage of String.replace() with a regex.  It's also faster than StringUtil.substitute().
Implemented substitute substitute() to substitute
StringUtil.substitute() which had unexpected behavior 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

WeaveTeam/WeaveJS,WeaveTeam/WeaveJS,WeaveTeam/WeaveJS,WeaveTeam/WeaveJS