button-handler: Add power button actions

Create match handlers for the following power button signals:

1) 'Released'
* If the system is off, then power it on.
* If the system is on, then soft power it off.

2) 'PressedLong' (Really means long press released)
* If the system is on, do an immediate power off.
* If the system is off, do nothing.

It only installs the match objects for these if the power button
object exists on D-Bus.  This is done so that systems that don't
implement a certain button won't still have watches on their
signals.

Tested:  Pushed buttons and watched the magic happen.

Change-Id: I6d17529d0dafc237f90a0e6a121e4b5da1204f81
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
3 files changed