Middleware Options

I refactored the middleware so it is now possible to pass options into the module. I did this for a very specific purpose; to be able to customize the errors being added into the error array, but now that it's here, more options can be used in the future. 

I also moved the `checkParam` function in one scoping level so it had access to the `_options` object.

Because this is a breaking change, I suggest the major release number is incremented by one.