Variety of initial-stage windows work

Sorry for the rather grab-bag nature of this.
I first factored out the widget creation code and standardized that, since the win32 API seems to do everything the same at least with the controls we're dealing with. I then used this new widget base class to implement the label widget and text input
I also made tab navigation work in non-dialogs.
I fixed a minor issue in the debug library.
Having a blank line at EOF is helpful for future diffs.