P2PS: Refactor p2p_data::query_hash and p2p_data::query_count use