Add provisioning code, and use it to set up policies.

Also includes a tweak to return protocol version during
validation, and some incomplete comment cleanup.

Change-Id: I7e609e1a3274a9e71a45349a7facc0d5c88c9565
3 files changed