Wrote a helper function to generate api mappings with less boilerplate.

This will give us the ability to specify the rest mapping in a more
declarative way.

I'm not certain I think the form_params argument is really necessary; It
can be taken out without affecting functionality, but might serve to
make the code a bit more self-documenting.

I converted a couple of the http wrappers over to this, but haven't
done the rest of them yet; I'd like to get some feedback first.
`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.
Merge remote-tracking branch 'moc/devel' into server-boilerplate

Conflicts:
	haas/api.py
Clarify decorator behavior, and a bunch of formatting changes.
Fixed formdata parameter names, and some cleanup.

Since the decorator finds the names of the formdata parameters by
inspecting the function, we need to name the functions' arguments to
match.

Also:

* removed some out of date comments re: globally unique labels
* removed a few out of date api calls (project_connect_headnode...)
Fixed a typo.
Merge remote-tracking branch 'moc/devel' into server-boilerplate

Conflicts:
	haas/api.py
	haas/server.py
Added query api to rest_api.md

Not sure what the url should be for list free nodes, open for
discussion.
Merge pull request #160 from zenhack/server-boilerplate

Server boilerplate
Discussed this briefly on IRC with George.

It's ugly, but obvious what's going on. We're going to want to revise
all of this before too long anyway, I'm sure.
Merge remote-tracking branch 'moc/devel' into query-api
Implemented list_free_nodes

This required a slight fix to rest_call, allowing us to actually return
a meaningful response that's not an error.
Show node, and cli wrappers.
Wrote some tests.
Merge pull request #166 from zenhack/query-api

Started query api