base: add support for using the flip switch to turn off the screen

Allow the flip cover to turn off screen when closed, turn on screen when opened.

See also https://gerrit.omnirom.org/#/c/8871/ for device implementation.

Change-Id: I3457af831bf5e9cd2d49efda52fb5961fee5d68f