Added policy error checking

Previously there were no checks on the syntax of policy
statements, besides those ensuring they matched the grammar.

This change adds a number of policy syntax checks.

Change-Id: I0625af891b3da00ed2df2e85bda061d304b26253