Verify enum values earlier

It wasn't clear to me that all of these enum values were being fully
validated by the internals, and it's better to fail early (so we can
report which function was at fault), so explicitly validate enum values
at the API entrypoints.

gcc/jit/ChangeLog.jit:
	* libgccjit.c (gcc_jit_context_get_type): Verify that "type"
	is valid immediately, rather than relying on called code.
	(gcc_jit_context_new_function): Likewise for "kind".
	(gcc_jit_context_new_unary_op): Likewise for "op".
	(valid_binary_op_p): New.
	(gcc_jit_context_new_binary_op): Verify that "op" is valid
	immediately, rather than relying on called code.
	(gcc_jit_context_new_comparison): Likewise.
	(gcc_jit_block_add_assignment_op): Likewise.

gcc/testsuite/ChangeLog.jit:
	* jit.dg/test-error-get-type-bad-enum.c: New test case.
	* jit.dg/test-error-new-binary-op-bad-op.c: Likewise.
	* jit.dg/test-error-new-function-bad-kind.c: Likewise.
	* jit.dg/test-error-new-unary-op-bad-op.c: Likewise.