added existing file check in windows registrar (get rid of FileNoFound error)
added remove old file before rename windows registrar (get rid of FileAlreadyExists error)
changed to explicit file close in writeRegistry() because 'defer' wont be exected before rotation methods called and it blocks file
Handle file creation and locking for Windows

Due to the use of the 'defer' keyword, file handles were kept open too long. This resulted in the error 'The process cannot access the file because it is being used by another process.'.

Another addition is for opening the file .logstash-forwarder. Initially this file will not exist. The Registar for Windows assumes this file exists. Therefore we explicitly tell the OS to create the file when it doesn't exist yet.

See also https://groups.google.com/forum/#!topic/logstash-users/oFDcoGj8Qtc
added loadState function to load the state from files and correctly close it
made it even clearer
Merge https://github.com/justmara/logstash-forwarder into file-rotation
resoved conflicting changes from both patches.
Merge branch 'master' of https://github.com/antosop/logstash-forwarder