Fix error when starting up with an empty DB

( accessing the slug of the 1st document when the document didn’t exist )
Be precise about dependencies
Trying out hosting through AppFog

Based on the CloudFoundry platform

Seems to work OK, although they are missing web sockets
Error handling was broken (Ha!)
Latest Derby version
Add more metadata (license, repository) to package.json
Accomodate another cloud hosting service, Heroku

Part of this is to make sure the public/derby folder
gets created through GIT, because on Heroku derby.js seems to
have trouble creating it.