(PDB-865) PDB 2.2 migration fails when nodes have no facts

This patch handles an error that occurs if a user attempts the 2.2 upgrade
with nodes that have no associated facts in the database, and adds some
additional testing around the migration.
Merge pull request #1083 from wkalt/ticket/stable/pdb-865-bad-data-migration-fix

(PDB-865) PDB 2.2 migration fails when nodes have no facts
(PDB-868) Add exponential back offs for db retry logic

This patch provides greater amount of retries, and exponential backoff logic
to avoid the case where the database is still throwing errors for a short
period of time. This commonly occurs during database restarts, and so this
logic is specifically targeted to handle smaller transient failures (not
large ones).

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #1086 from kbarber/ticket/stable/pdb-868-improve-57p01-retries

(PDB-868) Add exponential back offs for db retry logic
Merge branch 'stable'

* stable:
  (PDB-868) Add exponential back offs for db retry logic
  (PDB-865) PDB 2.2 migration fails when nodes have no facts

Conflicts:
	src/puppetlabs/puppetdb/jdbc.clj