speed fix for owl2obo

Replace inefficient code to speed-up conversion from owl to obo. For GO
this is now running in seconds instead of hours
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