bug fix: incomplete OBO writes

Always flush the buffer after writing
bug fix: missing [] for synonyms
add test for missing synonym brackets
bug fix: missing labels in comments

Use the whole ontology, and not only the OBO doc, to resolve names