Migrated child record handling to separate module to allow reuse in /api/records and /api/record (CTR-86).