Performance improvement in PAT helpers.py (70X)

Remove unnecessary copying in PAT helpers.MassSearchReplaceAnyInputTagVisitor. This can result a significant speedup in configuration parsing depending how many times massSearchReplaceAnyInputTag() function is called. Results identical dump (process.dumpPython()) in my tests. Also add unit test for the function.

PR #723 was based on these commits.