don't open log file before truncate file

failed to trancate file while file has opened on some filesystem(on the win32), don't open log file before trancate file.

I hope influxdb can be ported to win32 platform, I have more pull request, which is one of。

 #839 is duplcate, I close it

<!---
@huboard:{"order":746.0,"milestone_order":906,"custom_state":""}
-->