Add PDF Normalization

#566. Still need to fix some coffeescript syntax, use random.Id, add a database migration, change `files` to `cached`, and update comments.
You here have some assumption about how `cachedFilename` works and what it returns. It might be that in one year code will be different and migrations will fail because of that. So implement your own function to compute stuff. (If you have seen that we are using some methods elsewhere, tell me.)

In fact this is a good idea, probably documents should not be objects, but just data.