Clean up the middleware docs

Used code blocks when possible, and a minimal amount of
highlighting keywords.

Change-Id: Ie1dad50cc44afc6ce841e87f2ee9de3149e72117
Merge "Clean up the middleware docs"