Make memory backend obey 2i return terms properly

Otherwise it might send term/key pairs to an old node, which wouldn't
know what to do with them. Found with verify_2i_mixed_cluster test.