eliminate archaic functions

end_turn_record and end_turn_record_unlock are only used in one
place, and in succession. We delete them and paste the definitions
inline, which permits some simplification. This is a strict
refactor.