Convert ConfigDriveHelper to being a context manager itself.

This is a little bit less awkward than the previous implementation,
and is based on a suggestion from Padraig Brady.

Change-Id: If8b09a41d21777a4bd56af16e1f7e02d61d1dd4e
Merge "Convert ConfigDriveHelper to being a context manager itself."