Adding s3 upload

I've made a number of changes here

* added support for pushing documents to Amazon S3
* wired in S3 push to pages 6, 7 and 8
* changed the Document model
* made some small refactorings around magic numbers in various places
* introduced some environment-specific config
* failed uploads cause validation errors

There's some outstanding work around this to provide Amazon AWS credentials to the app via environment variables or some other mechanism that keeps them out of Github. I'll leave the team to do this how they normally do such things.