Fix racy glib assertion failure.

The info bar's unrealize signal can be emitted after the document's sci
is destroyed. Take a reference on the sci to avoid that.
document.c: Restore lost document_set_text_changed(doc, TRUE) call.

It got lost by accident in 5117940.