[Compaction] Add an example code for CompactFiles, make write-stall event available to EventListener.

Summary:
* Add an example code for CompactFiles, located in example/compact_files_example.cc.
* Make write-stall event available to EventListener.
* Addressed the racing condition between event listener and db shut-down.

Test Plan: db_test, compactor_test, listener_test, example/compact_files_example

Reviewers: sdong, ljin, igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D24693