Bound the view's close handler to the EVT_CLOSE event so that clicking
the application's "x" button does the same cleanup before exiting as
happens when selecting File->Exit.
Had to change the ApplicationView.close method to call 
mainframe.Destroy  instead mainframe.Close because Close generates 
another EVT_CLOSE event, producing an infinite loop.
Merge pull request #26 from drusk/clean_close

Issue24 - Perform application cleanup on pressing the window's "x" button