`make_rest_call` is now a decorator called `rest_call`.

...to be applied directly to the functions  in haas.api. I hit some
circular import dependencies, so the code has pretty much all moved into
haas.api; server is mostly obsolete, and will be removed soon.

I still need to apply the decorator to the rest of the api.
More descriptive name for `api_function`.
Decorator shouldn't disturb the api module's other tests.
Added the `rest_call` decorator to everything in `haas.api`.

Along the way, I noticed we had duplicate copies of
swtich_{register,delete} -- probably a merge goof. The duplicates have
been removed.

A bunch of these are actually broken now, because the names of the
arguments don't match the names sent in the form data.