Convert ChangeNameDialog to a Dialog

This makes it modal, fixing #2002 and several related issues, and
hopefully more clear. The escape key handling should also probably
be intercepted elsewhere, i just copied the old code here.
Revert "Gui test for #2002 Crash when trying to rename while rename dialog open"

This reverts commit e6edc47dffaa3e8169f0da47d2ccf0c327359ec0.

Because the rename dialog is modal now, i did not see an easy fix for
the test. If there is one, by all means go ahead and commit it again!