Proposed new feature or change
Currently middleware() can only be used only before an action is added, and prependMiddleware() only after action is added.
We can remove this restrictions:
middleware() adds middleware to end of list if action haven't been added, and adds it before action otherwise.
prependMiddleware() always prepends middleware to the list.