Clean up swift-{account, container}-info

Reuse common code; add unit tests; ensured coverage was at 100%.

Change-Id: Id6fcc7cb07fd178e00d43968e3e2cc03226fdc05
Merge "Clean up swift-{account, container}-info"