Terminus: support an alternate HTTP client for JRuby

This PR does two things (both only affecting the terminus code):

1. Abstract the instantiation of HTTP client objects into a new class, Puppetdb::HttpClient
2. Use a different implementation of an HTTP client when running under JRuby.

The motivation for this:

* All of the HTTP requests made via the terminus are HTTPS
* The JRuby implementation of the Ruby SSL layer is not the most mature part of the Ruby code base

This approach gives us the ability to provide our own implementation of an HTTPS client that doesn't rely on the JRuby SSL layer at all.