Add docstrings and preconditions to verification middleware
Merge pull request #284 from nicklewis/standardize-http-handlers

Standardize HTTP handlers
Some minor additions and fixes for utils

This is one more set of changes extracted from my reporting pull
request.  It includes:

* A few new utility functions that are useful for pre-conditions
* Fix to the datetime? function; it was previously returning true
  for objects whose classes supported ICoerce, even if the actual
  instance was not a valid datetime (`to-date-time` returning `nil`).
* Provide an additional signature for mapvals function
* New `maptrans` function
* New `validate-map` function
Remove sourceinstall rake task

Discussed with Mike and Haus; they were not aware of any reason
why the sourceinstall task needs to be kept around, and said it
was OK to remove it.
Remove lein1 backward-compatibility stuff

This commit simply removes the lein1 backwards-compatibility
section (dev-dependencies).  Since we want to make sure
we're building with lein2 from now on, it doesn't really make
sense to keep that around.
Fix the missing redirect from / to the dashboard

When the /v1 API was introduced, this redirect was accidentally removed,
causing / to not show the dashboard, and rather to error.
Explicitly use the /v1 API for metrics in the dashboard

This prevents a ton of deprecation warnings when using the dashboard.
Merge pull request #298 from cprice-puppet/maint/master/remove-sourceinstall

Remove sourceinstall rake task
Simplify `datetime?` and add tests
Optimize and clean up map functions

This commit includes the following:

* Did some benchmarking on the various permutations of mapvals, and
  tweaked the code to use what seemed to be the optimal implementations
  for the two signatures.
* Added tests
* Fixed maptrans so that it supports keywords as functions
Remove `validate-map` function
Merge pull request #301 from cprice-puppet/maint/master/remove-lein1-stuff

Remove lein1 backward-compatibility stuff
Extract migration helper functions for dropping constraints

This creates `drop-constraints`, along with `drop-primary-key` and
`drop-foreign-keys` which use it to drop particular kinds of
constraints.
Merge pull request #300 from nicklewis/better-constraint-handling

Extract migration helper functions for dropping constraints
Add a bounded-memoize function for better memo performance

`memo-lru` has a lot of smarts in it that we don't need over `memoize`,
which introduces a significant performance penalty on cache misses.
However, we still want to prevent the cache from growing unbounded, so
we use a naive approach of simply clearing the cache if it exceeds the
limit, which should be rare. The cache size is 40k, which is more than
sufficient even for my database of 26k nodes.

This change reduced the amount of time taken to compute the initial set
of resource hashes from ~15 seconds to ~225ms. Once the cache is
populated, performance is fairly similar in each case. Populations with
significant resource churn should see a good increase in the performance
of catalog storage.
Properly find edges that point at an exec by an alias

During namevar aliasing, we end up changing the :alias parameter to
'alias' and using that for the duration (to distinguish "our" aliases
form the "original" aliases). However, in the case of exec, we were
bailing out early because execs aren't isomorphic, and not adding
'alias'. Now we will always change :alias to 'alias', and just won't add
the namevar alias for execs.
Merge pull request #302 from nicklewis/improve-memoize-performance

Add a bounded-memoize function for better memo performance
Update src/com/puppetlabs/utils.clj

Update docstrings to clarify meaning of 'bound' parameter.
Merge pull request #304 from nicklewis/edges-to-exec-aliases

Properly find edges that point at an exec by an alias
Initial tests and possible fix for file resource relationships

These are some initial tests that Nick wrote to demonstrate the
bug where we were failing to create relationships (edges) to
File resources if the relationship was specified with a different
number of trailing slashes in the title than the title of the
original resource.  (Commit message edited by cprice.)

Conflicts:

	puppet/spec/unit/indirector/catalog/puppetdb_spec.rb