Support for threaded compession

This patch adds interfaces for platform-specific thread functions
Compression in separate thread

This patch implements compression in a separate thread via
ThreadedFile, derived from File, supporting LZ4 and SNAPPY trace
format, specified with APITRACE_COMPRESSOR environment variable.

ThreadedFile can be used only for writing.

Platform-specific semaphores are used to implement synchronization.