Redefine the notion of middleware and convert the internal middlewares.

A middleware is now defined like this:

type Middleware interface {
	MiddlewareFunc(handler HandlerFunc) HandlerFunc
}