Invert api and api/v1beta1 dependencies

This is some cleanup that has been needed for a while.
There's still one more step that could usefully be done, which is to
split up our api package into the part that provides the helper
functions and the part that provides the internal types. That can come
later.

The v1beta1 package is now a good example of what an api plugin should
do to version its types.
Merge pull request #1117 from lavalamp/fixApi

Invert api and api/v1beta1 dependencies