Finished code and tests for children code in /api/records (CTR-86).
Added final tests for child functionality in /api/record (CTR-86).