Support pseudo-unique IDs for documents

Add `GeanyDocument::id`, `document_find_by_id()` to plugin API.

This also fixes clicking on a *Messages* item whose document has been
closed and reused. Now the click will be ignored instead of jumping to
an unexpected line in the new document.

* Some discussion on this here: https://github.com/geany/geany/pull/247#issuecomment-42037982