Add an internal event-types API to get the field types of compound types

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>