The current behavior of a deprecation warning on every single
request is making the logs very difficult to scan for other
problems. One deprecation warning per run should be enough to
get the message across. This patch ensures only one warning per
lifetime of the middleware object.
Change-Id: I481a1b11305cc1c90edf7e26c686824c32fe781f
Closes-Bug: #1652929