Client-level class for communication with Nova

A class that has been in long development, so it includes functions that
are directed at previous generations of Nova (specifically, the PHP
version, which didn't use JSON).

Needs to be cleaned up.