Crash handling

Now dumps to latestcrash.txt and optionally displays a messagebox which
is enabled by default in release mode.