Basic integration of new v3 API endpoints and query paging

- Add new Endpoints event-counts, aggregate-event-counts, server-time can be requested using _query method

- Add new parameters summarize_by, count_by, count_filter added for event-counts and aggregate-event-counts

- Add support for include-total to fetch total number of results

- Add basic query paging support to _query method with parameters: order_by, limit, offset

- Add wrapper api methods for event_counts, aggregate_event_counts, server_time
fix for pep8 style check
Merge pull request #17 from juliushaertl/feature-v3-newapis

Basic integration of new v3 API endpoints and query paging
tests: Increase test coverage to ~75%.

The stuff that's easy to test has mostly been tested now, things like if
the correct URL is getting generated, if the types behave as expected
etc.

The trick now is either getting a PuppetDB with sample data to run on
Travis or mocking everything else so we can actually test the functions
on v2.API and v3.API.
tests: Remove the unicode() tests.

The ``unicode()`` function doesn't exist on Python 3+ so need to think
about how that's going to get tested.
Add nodes_with_status method to v3 api

This method returns queried nodes and adds information on their
status and the events of the latest report. The status is saved
as string and can have the following values:

 - unreported
 - changed
 - unchanged
 - failed

A node gets unreported by default after two hours without report.
This can be changed with the `unreported` parameter of the
`nodes_with_status` method.

Node objects now have new instance variables:

 - status: containing node status string
 - events: dict of event counts as returned from event-counts endpoint
 - unreported_time: time since last report as string
Include status query in existing nodes method

The status information will be included if the parameter
`with_status=True`
Merge pull request #18 from juliushaertl/feature-nodestatus

Add with_status kwarg to ``nodes()``.
fix for status without report timestamp

nodes without a report timestamp will status unreported

pep8 fix
Merge pull request #19 from juliushaertl/feature-nodestatus

fix for status without report timestamp
api: Fix too much copy-paste.
check for key 'status' in node dictionary
use "node['status'] = None" as default
Merge pull request #20 from fretterick/fix-nodes_with_status

Make sure the status key actually exists on a node.
pypuppetdb/api/v3.py: Trivial docs fix
Merge pull request #21 from nibalizer/doc_fix

pypuppetdb/api/v3.py: Trivial docs fix
Except HTTPError for puppetdb  error feedback

Added a large net for  requests.exceptions.HTTPError exceptions to catch
errors raised by the puppetdb api server.

It will log the raise_for_status() exceptions into the log buffer for
debugging errors.