Remove unused dependencies

These dependencies are no longer being used so they just add time to the
install and complication when shrinkwrapping or updating package.json.
Upgrade express to v3.17.5
Fix express deprecation warning with app.configure

This fixes the following warning:

    app.configure: Check app.get('env') in an if statement

Where we were previously using app.configure without an environment
specified I've simply removed the configure block entirely.

See http://expressjs.com/migrating-4.html#other-changes for more
details.
Fix express deprecation warning for app.del

Fixes the following warning:

    express deprecated app.del: Use app.delete instead
Remove unused middleware from instance-app

This local property isn't being used anywhere. Removing it to reduce
complexity/line count slightly.
Move test dependencies into devDependencies

These don't need to be installed on the production site so move them
into devDependencies in package.json and remove them from
npm-shrinkwrap.json.
Update dev dependencies
Fix travis builds under 0.8.x
Fix logger options
Upgrade image-proxy to 0.0.2
Upgrade popit-api
Search for organizations as well as people

Uses the API internally over HTTP as it's much cleaner than trying to
use it directly in code. Still needs to handle results with more than 30
matches.

Fixes #476
update popit-api module to version that has image upload

Update the API to be able to accept image uploads and also to update
image properties

Fixes #214
correct membership tense

Handle cases when we have a start and an end date to prevent things like
current memberships using 'will be a member of'

Fixes #663
add alternative image URL to match API schema

The API uses a different URL scheme to identify images so add an
alternative one for the UI so the two can match up.

Also update shrinkwrap to point at the version of the API that uses the
same URLs

For mysociety/popit-api#84
Pretty print json in production

This makes it easier to read in the browser when you don't have a json
prettifier extension installed.
Add a link to users PopIt instances
Update popit-api
Use the html url in search results
Use a middleware function for middleware config

Rather than exporting an object which then has to be added to app.locals
manually we simply export the middleware config as another piece of
middlware, which can then augments app.locals itself.

This has the added benefit of being able to do further configuration
beyond template locals if necessary.

I've also taken this opportunity to remove the dependency on the
'version' module, which was only being used here.