Import middleware from Oslo

Change-Id: I90babb2c1f2b4f875214d38ddad0ccb644adfd6c
Blueprint: count-api-requests
Merge "Import middleware from Oslo"