[OHAI-434] Detect and use the latest (recognized-working) EC2 metadata API

I found my previous implementation lacking given the variability of API versions. This updated version handles a broader spectrum of possible API versions.