add a retry when metadata fetched with a corrupt JSON format

Fixes #1868

This is the first patch I try to do for boto.
Any suggestion or criticism is appreciated.

Thanks
Henry