Add better error handling

Without this patch exceptions totally unrelated to the problem of
connecting to the metadata server are being lost and hidden.  This is a
problem because when I renamed the recursive function I didn't also
rename the call to itself.  The NoMethodError was being lost as a result
and I had no idea the problem was occurring.  The only reason I caught
it was because I noticed only a very few number of facts are defined.

This patch addresses the problem by confining the list of exception
classes to those that are connection related.
Fix define_metadata_facts recursion