convert parse-opal-event to have parse and print as separate things
this prepares the code for being a more general purpose library
by being able to parse things but not print them.
also fixes a few places where we'd leak memory if we failed to
parse a section correctly.
Signed-off-by: Stewart Smith <firstname.lastname@example.org>
Signed-off-by: Cyril Bur <email@example.com>