Close untitled buffers when real files get opened.

This matches GEdit behavior, and stops stupid "Untitled Buffer 1" from
hogging tons of space in the tabbar all the time.
Reset untitled count properly.