[LibFuzzer] Add support for an optional user defined callback (LLVMFuzzerOnExitHandler())
which is called when LibFuzzer exits.
This callback will be called by LibFuzzer when it exits in most
scenarios. It currently doesn't call the callback if:
- LibFuzzer is launched incorrectly.
- LibFuzzer observes that the client corrupts the fuzzing input.
This upstreams a change from the JFS solver's fork of LibFuzzer. JFS's use
case is to ensure that an event log gets flushed to disk whenever
LibFuzzer decides that it wants to exit. There are probably other use
cases too.