[PATCH v2 8/9] qapi: Factor out compat_policy_input_ok()