Refactor CTF-Writer to use some existing CTF structures and enums

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