Extracted middleware to addons

For the purpose of other middleware injecting before/after named
middleware
Merge pull request #1446 from bcardarella/bc-middleware-addons

Extracted middleware to addons