Cleaner and safer TMWorkspace API

With the previous TMWorkspace API it was possible to make the workspace
inconsistent by e.g. removing source files and forgetting to update
workspace. This could lead to non-obvious and not immediately visible
crashes.

The new set of the public (but also Geany private) API calls always
updates the workspace accordingly and neither of the calls can lead
to an inconsistent state of the workspace.

In addition, perform some minor cleanups and simplifications - unify
parsing from buffer and from file, support "parsing" of 0-sized buffers
and improve documentation.
Move tm_get_current_tag() from tm_workspace to tm_tag

This function has nothing to do with the workspace so it rather belongs
to tm_tag.
tagmanager: Speed up tag collection in tm_workspace_update()

The implementation first counts the tags because growing the GPtrArray
with set_size() is relatively slow, and anyway slower than counting tags
first.