refactor(typedef): deduplicate shared code, fix bugs, add macros
Bug fixes:
- sequential_reader: use get_typedef_kind_loose instead of strict
get_typedef_kind so object-annotation form schemas parse correctly
- validation: string_factory/bytes_factory accept object-annotation form
Deduplication (moved to schema.rs):
- get_typedef_kind_loose (was in 3 files)
- is_fixed_size replaces local is_fixed_kind (was in 2 files)
- resolve_ref_or_inline + resolve_ref (was in 2 files)
- U32_SIZE and DISCRIMINATOR_PATH constants (were in 3-4 files)
New macros (src/macros.rs):
- define_int_validator!, define_uint_validator!,
define_float_validator!, define_type_validator!
(eliminate ~200 lines of boilerplate in validation.rs)
- define_read_write_endian!, define_read_write_ne!
(eliminate ~320 lines of boilerplate in data_access.rs)
Net: ~1,170 lines removed, 288 tests pass, clippy clean