#38 - Port the Twitter middleware from katana

This is a direct port, no surprises.
Since we're here... doc comments need to be complete sentences...ish. So ending them with a period would be good.