Add Node class

The schema for Node was mostly adapted from teuthology's lock server,
which paddles will eventually replace. Also in this commit is a table to
manage the many-to-many relationship between Job and Node objects.
Add alembic migration for Node
Add Node.__json__()
Add NodesController and NodeController
Add jobs subquery API

e.g. for the last 5 jobs associated with plana72:
/nodes/plana72.front.sepia.ceph.com/jobs?count=5
It's also possible to pass "name=$run_name"
Add query for locked/unlocked nodes

e.g. /nodes/?locked=false
Ensure that any given job status is valid
Add job-status queries for nodes

e.g. /nodes/plana72.front.sepia.ceph.com/jobs?status=pass
and: /nodes/plana72.front.sepia.ceph.com/job_stats
The latter returns something like: {'pass': 9, 'fail: 1}
Add some 404 handling
Make Node.name unique
Move machine_types tuple to Node class
Add job_stats API to NodeController

For queries like:
/nodes/job_stats/ -> job stats for all nodes
/nodes/job_stats?machine_type=plana -> job stats for all planas
Make keys in job_nodes table primary
Add set_targets command
Make more Node columns nullable

It seems important to be able to create a Node via:
Node('planaXX.front.sepia.ceph.com')
Optimize job_stats queries

Instead of taking 20+ seconds, it now takes 0.13
Improve set_targets command

When it's rerun, it will skip jobs it's processed before. Also, it will
make sure nodes have their machine_type field set.
Order results of job_stats query by (fail + dead)
Job.set_or_update(): create Nodes if necessary

Test included!
Slight optimization of Job.set_or_update()

Related to filling-out of Job.target_nodes. Another test included.