Expose and use the new Pledge handler.

Adds tests, and production versions of the factored-out
dependencies. Changes pledge.jade to use the new handler.