TEIIDDES-1956: Refactor not refactoring some references

* To minimise edits in the refactored dependent models, a prefix is
  prepended to the text being replaced in SQL statements. These prefixes
  consist of punctuation marks commonly preceding model names in such
  statements, such as spaces, commas etc...

* The opening bracket needs to be included if the model name
  to-be-refactored is used in a function, eg. convert(Model.blah.id...)