Rename plugin.Middleware to plugin.MiddlewareFactory

While reading the code I found it confusing that `plugin.Middleware` does not represent middleware per se, but rather a thing that creates middleware. So I suggest renaming it to `MiddlewareFactory` to improve readability.