Initial (naive) implementation of report storage

This includes:

* Initial implementation of puppetdb report processor
* schema for event groups and resource events
* SQL-related scaffolding for event groups and resource events
* HTTP endpoints for querying events and event groups.

Does not yet support:

* Querying via any other means besides "group-id"
* Any other kind of event besides "resource" events

Conflicts:

	puppet/lib/puppet/util/puppetdb.rb
	src/com/puppetlabs/puppetdb/http/v2.clj
	src/com/puppetlabs/puppetdb/query/utils.clj
	src/com/puppetlabs/puppetdb/scf/migrate.clj
	src/com/puppetlabs/utils.clj
	test/com/puppetlabs/puppetdb/testutils.clj
Add comment with puppet ticket # re: report timestamps
Schema improvements and better tests for report storage

This commit does the following:

* breaks up the `group-id` field in the `event_groups` table
  into more discrete components (puppet version, report format,
  etc.)
* moves the logic for populating the group-id from the client
  to the server (we now use the id from the command annotation)
* renames a few other fields on the `events` table
* more complete tests for ruby report processor
* add a lein test for the command itself
Small tweaks to simplify debugging command tests

This commit does the following:

* Tweaks our `testutils/atom-logger` to include the stack trace of exceptions
  that are logged.
* Adds a (commented) line to `com.puppetlabs.puppetdb.test.command/test-msg-handler`
  that can be uncommented during debugging to provide access to the command
  processing log messages.
Rename "event group" to "report"

This commit just changes all existing occurrences of `event-group`
and `group-id` to `report` and `report-id`.  This includes
renaming some files.
Add UNIQUE constraint to resource_events table

We had a decent amount of discussion around the fact that the
"resource_events" table, in its current form, can't have a
meaningful primary key.  The "correct" primary key would be
(report_id + resource_type + resource_title + property), but
property is nullable because it is null for skipped resources.
We discussed the idea of splitting this table into multiple
tables, but ultimately decided that for now, a UNIQUE constraint
would be good enough.
Relate reports to certnames table

This commit just adds a foreign key from the reports table to the
certnames table, and adds code to make sure that we add the
certname if a report is submitted for a node that isn't already
in the certnames table.
Add `report_timestamp` to the output of the `status` endpoint

Now that we are storing reports for the nodes, we include
the timestamp of the most recent report in the output of
the `status` endpoint.
Add a basic test for add-report in `storage.clj`

Prior to this commit I didn't have any tests for
`add-report!` in `storage.clj`.  This commit adds
a basic test.  We could probably use some additional
tests there, but this will at least serve as a
placeholder.
Update acceptance test to work with latest urls / data structures
Merge branch 'master' into feature/master/report-storage
Update 'store report' command to use new `activate-node!` pattern

This updates the `store report` command to use the new pattern
introduced in commit ebe3f32.
Get rid of `description` field in reports table

We'd added a `description` field to the table back
when it was still called `event_groups` and we were
trying to be generic.  It seemed like it might be
useful for different event sources to have a place
to provide some human-readable explanation of what
triggered the events.

Now that the table is more specific (`reports`),
this column no longer feels useful, so I'm getting
rid of it.  We can always add something like it
back in later when we start supporting other
event sources.
Add metric for time spent storing reports
Improve log message for `store report` command

This just changes the log message for the `store report` command
to log the puppet version and the certname, rather than logging
the (useless) report id.
Add support for resource/fact subqueries
Clean up report/event ring apps so that they follow our new patterns
General cleanup / TODOs
Implement resource/resource subqueries
Add a failing test that v1 subqueries are unsupported