Fixing bug where UPDATE failed on slave and some cleanup of ndb_unpack_record().
This includes both code and test cases.