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.