Provide a configdrive helper which uses contextlib.

As suggested on review of Ib23d117ad4cd5dc92298a0812eb468f7d557417c.

Resolves bug 1092248.

Change-Id: I2829ac60732b86b9853983b03ef6f30f5c5a3283
Merge "Provide a configdrive helper which uses contextlib."