Merge pull request #336 from cprice-puppet/maint/master/acceptance-use-lein2-when-running-from-source

Acceptance: use lein2 when running acceptance tests from source
Merge pull request #337 from cprice-puppet/maint/master/acceptance-increase-startup-timeout

Increase timeout for waiting for puppetdb to start up
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