Pretty-print HTTP JSON responses

It's the little things, yo.

Signed-off-by: Deepak Giridharagopal <deepak@puppetlabs.com>
Merge pull request #346 from grimradical/17498_pretty_print_json

(#17498) Pretty-print HTTP JSON responses
(#17216) Improve acceptance test for binary file content

This commit does the following:

* Adds a directory `acceptance/data` where we can put content that is
  useful for acceptance tests in cases where it's not really feasible
  to inline it into the tests themselves.
* Adds an `:acceptance_data_dir` key to the main acceptance config,
  which can be used to retrieve the base directory where acceptance
  content is stored.
* Use a much larger chunk of binary data for the acceptance test
  relating to binary content for File resources.  The previous
  acceptance test was only testing a few bytes, and was passing.
(#17216) Small tweak to allow ruby 1.8 code path to be executed by ruby 1.9

For testing purposes, it is useful to be able to run the ruby
1.8 UTF-8-sanitizing code path in ruby 1.9, so that we can compare
the output against the real ruby 1.9 code path.  This commit
just abstracts some of the oddities where the String API differs
between the two rubies.
(#17216) Compose UTF-8 cleaning methods for ruby 1.8

We've tried doing UTF8 cleaning for ruby 1.8 a few different
ways.  Doing it via IConv, we don't do a good job of handling
characters whose codepoints would exceed the legal maximum for UTF-8.
Doing it via our manual ruby scrubbing code is slower and doesn't
catch overlong encodings.  Since this code really shouldn't even
exist in the first place we've decided to simply compose the two
scrubbing methods for now, rather than trying to add manual detection
of overlong encodings.  It'd be a non-trivial chunk of code, and
it'd have to do a lot of bitwise arithmetic (which Ruby
is not blazingly fast at).

Between our existing ruby 1.8 manual cleaning stuff and IConv, I
think we cover all of the known problem cases.  This commit
simply changes the ruby 1.8 code path to call both of those
cleaning methods.
(#17216) Change default behavior of ruby1.8 UTF-8 to strip invalid chars

Prior to this commit, our manual-scrubbing UTF-8 code for ruby 1.8
would replace invalid characters with the unicode replacement
character.  While I consider this preferable, we are now using
IConv as part of our default code path again, and it simply strips
invalid characters rather than replacing them with the replacement
char.  In order to make our code more consistent with that behavior,
we now accept a boolean parameter which tells us whether to strip
invalid characters or replace them.

This commit also updates the spec tests to conform to this behavior,
and thus, you know... pass.
(#17216) Fix typo in method comments
Merge pull request #350 from cprice-puppet/bug/1.0.x/17216-more-fun-with-binary-file-content

Bug/1.0.x/17216 more fun with binary file content
(#17524) Better logging / error handling for version check

Prior to this commit, if a call to the `version` REST endpoint
failed, we were not handling the error gracefully.  This commit
does the following:

* Catches exceptions and returns a reasonable http error to
  the caller
* Logs a message at DEBUG level with some details about the failure
(#17524) Add documentation for the `update-server` setting
Improvements to latest-version check

This commit does the following:

* Moves some 'version number'-related stuff out of utils and into
  its own new namespace.
* Adds support for passing a map of data to the latest-version check
* Passes database name / version to version check

Conflicts:

	src/com/puppetlabs/puppetdb/cli/services.clj
	src/com/puppetlabs/puppetdb/http/version.clj
General hygeine; add docstrings, preconditions, etc.
Merge pull request #354 from cprice-puppet/bug/1.0.x/17524/improvements-to-version-check

Bug/1.0.x/17524/improvements to version check
Update CHANGELOG for 1.0.3

Signed-off-by: Deepak Giridharagopal <deepak@puppetlabs.com>
Merge pull request #355 from grimradical/changelog_1.0.3

Update CHANGELOG for 1.0.3
Fix postgres query for numeric comparisons

This commit changes the regex that we are using for
numeric comparisons in postgres to a format that
is compatible with both 8.4 and 9.1.