mq: fold the code path to invoke editor into specific logic (qnew)
This factoring simplifies the succeeding patch to switch from
"ui.edit()" to "getcommiteditor()" for qnew.
To run the tests, do:cd tests/python run-tests.pySee http://mercurial.selenic.com/wiki/WritingTests formore information on writing tests.