Rewrite for code reusability

Replace rcon_client with a more general query class that can be
used to send other types of queries, not just for RCON.