presence: detect and report GPIO exceptions on startup

To address issue ibm2982, we will now catch exceptions when creating the
GPIO presence sensor and substitute it with a nullary sensor that always
reports non-present. This will give proper error logging for the basic
failure scenario of disconnected hardware. Currently this scenario
causes a core dump and subsequent investigation.

Additionally, an OpenBMC event log has been created using the label
xyz.openbmc_project.Fan.Presence.Error.GPIODeviceUnavailable

Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Change-Id: Ib25fb27ed4a0a23aae667beb1e7708ada7ea7d65
2 files changed