Fix crash on exit (BL-487)

The main crash got fixed in geckofx, but this change fixes some
missing dispose calls that might also have contributed to the
problem.
This gets called from Browser.OnApplicationExit. We want this code to be called when the application exits, but it needs to be done before Browser.OnApplicationExit calls Xpcom.Shutdown, so I added Browser.XulRunnerShutdown event.