Add window delegate, and implement close event on mac. Also set window resizable.

Unused variable warning on this line.