Initial commit of standard variable perf spike. View based query plus removal of properties and synonyms.
Revert the changes to load StandardVariable from the standard_variable_summary view. Limit first set of refactoring to just the removal of properties and nameSynonyms. standard_variable_summary view integration for reading will be reviewed later and be integrated if needed.
Keep the old behaviour of setting the id on return value even if the cvterm may not be found in the next step. Just being cautious.
Fixed error in refactored "read all" (create) method.
Resolved rebase merge conflicts with current master version of TestOntologyServiceImpl.
Merged local branch 'stdvar_perf' into master.

Removed the "properties" and "nameSynonym" collections from the "StandardVariable" and "Term" objects of the Ontology API. These two collections for a StandardVariable should be loaded/read only when needed, NOT on each and every load of StandardVariable where they are almost always NOT required by the callers. This dramatically reduces the query volumes (from about 47 queries per StandardVariable read down to just 15) and improves read performance on many view screens of BMS e.g. the Study Browser and the Ontology Browser where StandardVariables are read thousands of times.

StandardVariables are one of the widely used concepts within the BMS and should be read from the database carefully. This change to the API also means that not only read, but write operations for StandardVariables may need to handle properties and nameSynonyms separately, only when required. Methods may be exposed on the Ontology API as required for read/write handling of properties and nameSynonyms as needed. In summary for StandardVariable CRUD operations, now:

Read: properties and nameSynonyms will not be loaded for each Term that makes up the StandardVariable, they are no longer present on the "Term" object. Can be loaded separately when needed for any Term.
Save: nameSynonyms were previously saved which will no longer happen - there are no current use cases for this anyway. Separate saveSynonyms method should be added when needed. Term properties were not saved in existing impl already.
Delete: nameSynonyms will still be deleted as before. Properties for each term that makes up StandardVariable were not deleted in existing impl anyway.
Update: No handling of properties any synonyms of terms in existing impl. Effectively no change in behavior.

Some other properties e.g. constraints, enumerations may also be reviewed in future for separation into StandardVariable "summary" and "details" concepts.

Reviewed By: Rebecca Berrigan