Moved definition-validation logic into LwM2mObjectDefinition and other small cleanups