authpolicy: Autogenerate user policy encoder

Uses recent changes to generate_policy_source.py to autogenerate
Chrome OS code to encode a RegistryDict into a user policy protobuf.
Replaces checked-in code that had been manually generated a few months
back. As a result, if Chrome OS user policies get added, one only has to
uprev the protofiles ebuild to point to the latest policy_templates.json
and authpolicy will automatically support those policies.

Also adds support for device policies that have been added in the past
month since the protofiles ebuild has been last uprev'ed. Device policy
cannot automatically be encoded since there is no 1:1 mapping between
policy_templates.json and the device policy proto.

CQ-DEPEND=CL:461860

BUG=chromium:659078
TEST=Compiled, ran tests, tested all new device policies if available
     (two were not due to 'future' and 'external').

Change-Id: I0254ada8bc2696f8ed38bbb0979dca00b37f86a4
Reviewed-on: https://chromium-review.googlesource.com/461921
Commit-Ready: Lutz Justen <ljusten@chromium.org>
Tested-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Zentaro Kavanagh <zentaro@google.com>
8 files changed