login: Back up block_devmode flag in VPD.

Also clear the crossystem nvram_cleared flag once the crossystem
block_devmode flag has been set to allow chromeos_startup avoid
calling slow VPD operations in case NVRAM hasn't been reset.

Also, move the Crossystem instantiation from main() down to
SessionManagerService to remove unnecessary code.

BUG=chrome-os-partner:50142
TEST=toggling policy in CPanel causes correct NVRAM and VPD changes
TEST=dev mode inhibited even after NVRAM is cleared
TEST=dev mode not inhibited when policy is not set
TEST=dev mode not inhibited for consumer-owned device
CQ-DEPEND=CL:329201

Change-Id: I219d9055d22aa87def545aa722ecec694bf90bb9
Previous-Reviewed-on: https://chromium-review.googlesource.com/329093
(cherry picked from commit 83bf28833f28c619e1aa16b06f940f7c1c6de5b8)
Reviewed-on: https://chromium-review.googlesource.com/331530
Reviewed-by: Thiemo Nagel <tnagel@chromium.org>
Commit-Queue: Thiemo Nagel <tnagel@chromium.org>
Tested-by: Thiemo Nagel <tnagel@chromium.org>
15 files changed