Various changes

I've been working on various changes for the gem:
* Allow parameters in a URL
* Don't set the full (server side) PDF path in the session
* Lots of refactoring especially in the Middleware class
* Various smaller changes

Martin