split and reformat textbox class into text.cpp

I have not made a mistake in not updating the makefile: text.cpp did
exist before, it just contained only functions rather than any class
methods.
make quit date box erase when wrong; reindent mouse function