Making KVQuery implements KVMessage.
Had to refactor many classes, but didn't change anything logical in
they.