hash_set: implement serialization.