Switch to a safer implementation of DataPage::delete_record() and add a test.