add a retry when metadata fetched with a corrupt JSON format
Fixes #1868
PEP8 Issues
Merge pull request #1883 from henrysher/henrysher-patch-boto-utils

Add a retry when EC2 metadata is returned as corrupt JSON. Fixes #1883, #1868.