A bit of refactoring in the unit tests for haas.model.

In particular:

* Database setup is now handled as part of a superclass. This will make
  it easier to add additional test cases.
* More docstrings.
Basic test that actual insertion into the db works.

Right now this just covers the User class, but there is a base class
that will make similar test cases easy to write.
Added more database insertion tests

Specifically, added tests for:

* Nic
* Switch
Moved some functionality from haas.headnode to haas.model.Headnode.

This is starting to address issue #5. I'm going to need to use this to
implement project_deploy, so now is a good time.
Removed some more unneeded code from haas.headnode.

These were just stubs, which were never implemented and don't need to be.
Merge branch 'hotfix/_must_find' into project_deploy
Implemented haas.api.project_deploy.

Partially, anyhow - it creates/starts a headnode, but nothing else.
Added an HTTP interface to `project_deploy`.

The extra line added to `api_function` gets around an exception flask
was throwing wrt duplicate function names for views.

The URL and HTTP method are different from what was previously documented
in `doc/rest_api.md`; the docs have been updated to match.
Started work on a CLI tool.

Right now all you can do is start the server, but going forward we'll
use this to issue client-side commands as well.
Merge remote-tracking branch 'moc/devel' into cli
Merge remote-tracking branch 'moc/devel' into project_deploy
Implemented user_create in the CLI client.

This involved a few touch-ups to the rest of the CLI.
Reworked rest api mapping docs.

Made it generally more consistent.
Fixed a formatting issue.

Adding the bit of text between the list and the full spec convinces github to make the summary a code block, which is what was intended.
The {h,}nic in {connect,detach}_network is now part of the url.

Previously it was passed in as part of the body.
Added an endpoint for the cli tool to haas.cfg.example.

This will be the correct endpoint when haas serve is invoked from the
cli.
Deleted some trailing whitespace.
test/unit/api.py: Fixed a few issues caught by pyflakes

* Removed haas.config import - it was unused.
* Two pep8 violations; space after the comma and two blank lines between
  top-level constructs.
Wrote some tests exposing breakage in group_{add,remove}_user.
Fixed some bogus conditions.

These were causing the breakage caught by the tests in the previous
commit. I'm not sure why someone thought this would test for set
membership.