finished work on the JsonDocumentDefinition and associated classes, including wiring-up checks that allow the mappings to be checked early where possible and calculated from the context when the definition has not made types explicit