MFC r204878:  Change the way shutdown is handled for log file.
MFC r204878:
 Change the way shutdown is handled for log file.

 pmc_flush_logfile is now non-blocking and just ask the kernel
 to shutdown the file. From that point, no more data is
 accepted by the log thread and when the last buffer is flushed
 the file is closed.

 This will remove a deadlock between pmcstat asking for
 flush while it cannot flush the pipe itself.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase