ModelPersistence: towards clear separation between SModel and the way it persists: there should be only 1 SModel implementation (not Binary, Default and FilePerRoot), and persistence aspect shall be extracted away. Step 1: expose model reference in SModelHeader (no reason to keep distinct headers).
Persistence API updated to move away from assumption Object#toString for reference/id objects gives persistence-ready format (and not debugger/user-friendly as one might expect).
ModelPersistence: towards clear separation between SModel and the way it persists: there should be only 1 SModel implementation (not Binary, Default and FilePerRoot), and persistence aspect shall be extracted away. Step 2: BinaryModelHeader is SModelHeader, no reason to duplicate the two.
ModelPersistence: extract persistence aspect into LazyLoadFacility, refactor binary, default and file-per-root model implementations to use it (now almost identical classes).
ModelPersistence: persistenceVersion as attribute of SModel (model descriptor) rather than that of SModelData. Implicit update of persistence version is not what every client needs/wants
ModelPersistence: drop update of persistenceVersion inside SModelData as part of toString/toXML serialization process.
ModelPersistence: persistenceVersion as attribute of SModel (model descriptor) rather than that of SModelData.
ModelPersistence: use openapi (PersistenceFacade) to read and write model instead of direct access to serialization implementations
ModelPersistence: do not duplicate storage of a data associated with model (persistence version, doNotGenerate and other properties) - use SModelHeader to keep this metainfo, leave single header for both DefaultSModelDescriptor and DefaultSModel not to synchronise them (unless DefaultSModel is detached).
SModelHeader becomes model metainfo holder and thus is exposed for IModelWriter. Persistence read code shall not update persistence version as this version activated the reader at hand. SModelHeader#updateDefaults is no longer needed as there's only one header.
Extracted PersistenceVersionAware aspect of openapi.SModel to drop coupling with DefaultSModel implementation.
Expose generateIntoModelFolder attribute in GeneratableSModel to avoid access to SModelData internals
ModelPersistence: address jps/plugin performance hack with dedicated factory methods to create appropriate model descriptors without need to read header once again.
ModelPersistence: Use of full-fledged models instead of implementation-level model data demands write access
ModelPersistence: with recent unification in DefaultSModelDescriptor and FilePerRootSModel it turned out .history (refactoring) files were never read for FilePerRoot case as there's an exception when file is missing. Check for file existence (although the approach with availableStreams is likely non-effective) to avoid exception.
Merge remote-tracking branch 'origin/master' into 3.2/artem/default