builder/virt-index-validate: try to cleanup in any occasion

Always close the file (ignoring its result) after a parsing, and cleanup
the parse_context object before any exit().

This eases the debugging of memory issues in the actual parser.
builder: rename and make public the section/field free functions

They will be needed also elsewhere.
builder: clean the parsing structs on error