[autotest] Fix inventory handling when `last_diagnosis()` fails.

In the lab_inventory, when `_get_diagnosis()` encountered an exception
it would return `None`.  Unfortunately, callers expected a `_Diagnosis`
tuple in all cases.

This fixes the exception return case, and adds a unit test to prevent
a recurrence.

BUG=None
TEST=Run the unit tests

Change-Id: I782231e0516c87600cb74d922edf96dbda1bc83a
Reviewed-on: https://chromium-review.googlesource.com/1246467
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Richard Barnette <jrbarnette@google.com>
Reviewed-by: Matthew Leszczenski <stagenut@chromium.org>
Reviewed-by: Jacob Kopczynski <jkop@chromium.org>
diff --git a/site_utils/lab_inventory.py b/site_utils/lab_inventory.py
index 9148744..8b9b646 100755
--- a/site_utils/lab_inventory.py
+++ b/site_utils/lab_inventory.py
@@ -152,6 +152,8 @@
     finally:
         _MISSING_DUT_METRIC.increment(
             fields={'host': history.hostname, 'presence': dut_present})
+    return _Diagnosis(None, None)
+
 
 def _host_is_working(history):
     return _get_diagnosis(history).status == status_history.WORKING