Perf: avoid compiling regular expression patterns over and over in AS7 plugin hotspots

Also:
* in VersionedRuntimeDiscovery, fixed a string != string issue
* avoid string concat when working with a stringBuilder (it creates a useless additional builder)