Add board type handling to the power_state_controller module.

This changes the interface for creating PowerStateController
objects to provide a factory function that uses the board
type to select a subclass that implements the necessary methods.

The board type is determined from servod using the new `get_board()`
function.

This change still restricts servo recovery to Alex and Lumpy, but
changes how the restriction is enforced, so that the path for adding
new boards is clear and easy.

CQ-DEPEND=CL:45621

BUG=chromium-os:35804
TEST=platform_InstallTestImage on a locally attached Alex
TEST=manually trigger repair for an Alex in a local autotest installation

Change-Id: I676c0ed393b238e570a3c337bd78c1ec967da3db
Reviewed-on: https://gerrit.chromium.org/gerrit/45619
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
3 files changed