Further changes to make a NSDocument architecture. Added an NSWindowController for the UI view controller. This allows key presses to be captured. Moved logic from Document to the DocumentWindowController. Some cleanup of bindings, need to be reattached in next commit.