Extract RESTHandler and allow API groupings

Prepare for running multiple API versions on the same HTTP server
by decoupling some of the mechanics of apiserver.  Define a new
APIGroup object which represents a version of the API.

@brendandburns this is a variant of the earlier pull but will allow
multiple apigroups

Supports #635