Use a faster query to retrieve report_timestamp

This was performing a correlated subquery with an ORDER BY clause on
reports in order to retrieve the latest report for each node, which is
slow and runs many times. Now we take advantage of the latest_reports
table to make fetching the latest report inexpensive. In testing, the
round trip time for /v2/nodes with 179 nodes went from ~700ms to ~33ms.
Merge pull request #633 from nicklewis/faster-report-timestamps

Use a faster query to retrieve report_timestamp
Merge pull request #629 from cprice404/feature/burgundy/paged-queries

Paged query support
Change return value of `paged-query-to-vec` to a map

`paged-query-to-vec` needs to be able to return the total count
of rows that would have been returned by a paged query, in
addition to the actual result set.  In order to accomplish this,
we need to change the return type from an array to a map.

For now, this map contains just a single key, `:results`, whose
value is the same vector of results that the function was previously
returning.  In a subsequent commit we'll add a `:count` (or similar)
key that can be optionally populated with the count data.
Add support for `count?` flag in paging code
Update facts/fact-names to support paging with counts
Update events endpoint to support paging with counts
Update reports endpoint to support paging with counts.
Add support for counts on paged queries on node endpoint
Add support for counts for paged queries on resources endpoint