ModelEntityManager: use ByteArrayRef.
- ByteArrayRef.delete: if the entity has been loaded, use the optimistic locking delete.
- VariableScopeImpl: the delete must be done after recordVariableUpdate.
- Fix VariablesTest.
DeserializedObject: use the new VariableInstanceEntity.setBytes