Decouple apiserver from codec implementation

The apiserver on initialization must be provided with a codec for encoding
and decoding all handled objects including api.Status and api.ServerOp.  In
addition, RESTStorage objects may now optionally implement Extract() or
instead rely on the codec to decode for them.

NOTE: Only the last commit is new, the other commit is in #806
I hate copying these everywhere almost as much as I hate extra dependencies. :( Can we make a tiny package just to declare the interface? I guess that's ugly too.