(NC-189) Fix SQL error when annotating a group with no parameters

The annotate-groups function was constructing a SQL query that required a
parameter list even when there were no parameters. This commit adds a check so
we skip that step when there are no parameters.
Merge pull request #51 from pcarlisle/nc-189-annotation-sql-error

(NC-189) Fix SQL error when annotating a group with no parameters
(maint) Simplify uuid? implementation, add tests.

Previously, uuid? would error when passed things that weren't UUIDs or
strings. Change the predicate to just coerce the result of converting
the argument with `->uuid` to a boolean, simplifying the implementation
and increasing safety.

Add tests to make sure that testing and converting things besides UUIDs
or Strings doesn't error.
(NC-188) Begin the Great UUID Reorganization.

Change the database to make the group ID the primary key, rather than
the name. Accordingly, change the foreign key links to refer to group ID
over group name.

Change the Group schema to require the :id key and make :parent a UUID.
Change the GroupDelta schema similarly, to requir the :id key, make
:name optional, and make :parent a UUID.

Change the group-delta utility for creating a delta between two groups
to always have the :id and ensure the :ids are equal.

Change the Rule schema to have :group-id as an optional key, rather than
:group-name.

THIS BREAKS ALL THE THINGS. If you are git-bisecting, you should skip
all the NC-188 commits from this one up until where the branch is merged
back in.

change Rule schema - fixup somewhere
(NC-188) Storage uses group ID as primary key.

Replace get-group-by-name/id and delete-group-by-name/id with get-group
and delete-group, respectively, that only take ids.

Modify http.clj and its test to no longer refer to the old methods in
order to make them compile, though they're still totally broken.

The postgres storage implementation has been updated to use the new
database structure. It passes all its tests again! However...

ALMOST ALL THE THINGS ARE BROKEN! Most acceptance, http, and postgres
storage tests will fail, though the rest should be fine. If you are
bisecting, you should probably skip everything from the first NC-188
commit up until it gets merged in.
(NC-188) HTTP API uses UUID as sole group key.

Rather than determining whether the group identifier passed in the URI
is a UUID or a group name, the HTTP handler assumes it's a UUID and
tries to parse it as such.

Since the ID is always present in the URI but may also be submitted in
the body, there's a new way for a group request to be malformed: if
these two IDs are different.

All the HTTP tests now pass again, however...

MOST OF THE THINGS ARE STILL BROKEN. The rules, classification, and
acceptance tests still mostly error out. If you are bisecting, you
should probably skip all commits from the first NC-188 commit up to the
merge commit.
(NC-188) Rules use group ids instead of names.

The change is basically just returning the :group-id field of the rule
instead of the :group-name (and changing the schema of apply-rule
accordingly).

LOTS OF THINGS ARE STILL BROKEN. The classification and acceptance tests
still mostly error out. If you are bisecting, you should probably skip
all commits from the first NC-188 commit up to the merge commit.
(NC-188) Fix classification tests.

The tests just had to update their test group to meet the schema.

Change the classification/matching-groups docstring to note that it
returns group ids, rather than names.

Change the local used by the classification http route from
`group-names` to `group-ids` in order to reflect this change.

LOTS OF THINGS ARE STILL BROKEN. The acceptance tests mostly error out.
If you are bisecting, you should probably skip all commits from the
first NC-188 commit up to the merge commit.
(NC-188) Return 400 on malformed parent UUIDs.

Now that the parent field is also a UUID, when a group is submitted with
a parent field and its value is not a valid UUID, return a 400 Bad
Request response, with an error message indicating that the parent field
was malformed.

ACCEPTANCE TESTS ARE STILL BROKEN. If you are bisecting, you should
probably skip all commits from the first NC-188 commit until the next
commit, where the acceptance tests get updated and everything passes
again.
(NC-188) Update acceptance tests.

Everything passes again now. Yay!
(maint) Structured 404 responses.

It was kinda weird that 404s were the only non-structured error
responses, so change that where we can.
(NC-188) Update API docs to reflect ID as pkey.
(NC-188) Update integration tests to use new API.
Merge pull request #52 from aperiodic/nc-188-uuid-pkey

(NC-188) Group primary key is ID, not name.
(maint) Fix postgres test broken by merge.

While the NC-188 branch work was going on, a new test using the
`get-group-by-name` storage protocol method removed in that branch was
added and merged in to master, so was broken by the merge.

Change this test to use `get-group` with ID as the argument.
(NC-142) Upload facts and trusted data in the terminus

This changes the terminus to use a POST to supply the node's facts.
(WIP) Allow POST for classification
(WIP) merge uploaded facts into node
Remove catchall
(WIP) Lookup nested values