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.  Let me know if you need something different.

Supports #635