Updates express middleware to support async definitions (#291)

`next` argument is optional and if set it will block until it's called