Escaping user-controlled data in templates
More user data escaping
Quick fix to give 500 instead of timing out
Quick fix: normalize assertions on upload
Quick fix: migration to clear out bad badges
Renamed a variable in new migration to read better
Fix non-normalized badge bodies instead of deleting them
Explaining migration match condition:
  really want to match badges where body.badge is a url,
  currently matching where body.badge is not an object which
  seems to be the only valid form we store in the DB.

  Also, triggering travis.
Substitute middleware.testUser() with lib/browserid.js stubbing.

The testUser middleware has a number of downsides: once present, a
test user can't actually log out, and it also doesn't exercise the
browserID integration code at all.

This commit changes things to stub out things at the points of
integration with the BrowserID service, which makes it possible to
test login/logout without actually talking to BrowserID. In order to
do this, I had to add an export to browserid.js called
getIncludeScriptUrl(), which usually returns the URL to the persona
include script--but if testing conditions are set, instead returns
a JS Data URI that stubs out navigator.id.get().

From the docs I added to lib/browserid.js:

// The BROWSERID_TEST_USER environment variable is used for testing
// BrowserID/Persona without actually talking to the service.
//
// if defined, the environment variable should be either an email
// address, or the word 'error' or 'prompt'.
//
// In all cases, this module's exports are modified to
// have navigator.id.get() return a fake assertion on the browser side,
// and to have this module's verify() function process the fake
// assertion on the server side.
//
// If BROWSERID_TEST_USER is an email address, then the given user
// is always successfully validated.
//
// If it is 'error', then this module's verify() function always
// returns an error condition.
//
// If it is 'prompt', then the user is prompted for an email address
// when navigator.id.get() is called, and whatever they type is
// used as an email address. They can also enter 'error', in which
// case this module's verify() function fails.
decoupled browserid.js from process.env. added tests.
fix the login-test acceptance test by using BROWSERID_TEST_USER.
Merge pull request #799 from stenington/sanitize

[WIP] Sanitize user data
Fix escaping issues
Changing broken badge migration back to removal instead of reparation.

Removal has fewer edge cases, and users wouldn't have known that the upload
of the bad badges has succeeded at all.
Merge pull request #838 from stenington/828-broken-upload

Fix for broken badge upload
put browserid.configure() call in app.configure development thing
Merge pull request #843 from toolness/development

Substitute middleware.testUser() with lib/browserid.js stubbing.
Explicitly set the content-type of backpack connect errors to text/plain.

This also required changing conmock.js' type() implementation, since
express allows it to be chained, while our mock doesn't.
Merge pull request #847 from toolness/bpconnect-text-errors

Explicitly set the content-type of backpack connect errors to text/plain
Fix broken badge uploads