made middleware context consistently the rack

I actually made a mistake with this because when I initially scanned the source before using it I saw that you were applying in the context of this. However, when the first middleware calls next it probably will have a different context. Perhaps this is intentional to allow each middleware to manipulate the context, in which case you should clarify this in the readme so others don't make the same mistake. Otherwise cool you can just merge. I think its a really nice feature calling them in the context of the rack.
  
I also added a component.json and made a couple of optimisations.