Make consumer_for a context manager

This patch converts consumer_for into a `contextmanager` decorated
method and adapts `__getattribute__` to support this change. A new
method was not added to avoid clashes with method names in the stages.

Change-Id: I6c0727e86d9ee8d6bd34c312d180040c8baf34ba
Merge "Make consumer_for a context manager"