Add support for setting a window delegate, and implement close event on mac.
Merge pull request #123 from glennw/mac_close

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