[1070326] RFE: Allow AS7 deployments to provide version in the artifact name
- Limit the special version-handling to only Deployments or those types that
  "run-inside" Deployments.
- Make the version Pattern configurable.
- Make the regex matching more efficient by using a single Matcher and
  resetting as necessary.
- fix up a mock