Allow plugins to add express middlewares (rebased changes from javoire, closes #21)