Add two helper functions to check event type/code

These aren't really that useful since they're just one or two lines in
code, but it saves callers from accidentally misplacing braces, etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: unify test case creation in test-event-names.c

Simple rename from custom test case variable names to tc

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: add test for event values (type and code)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>