Split the CTF-Writer API into IR and Writer-specific parts

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