Main window: Make "new document" always point to the same document as long as this document is really a new one (ie no page inside yet)

Signed-off-by: Jerome Flesch <jflesch@gmail.com>