Server: convert object handling subs to methods

The object handling subroutines are now methods of the server
object.  This allows the object cache to be stored inside
the object itself.