apps/nsq_to_file: add <PID> filename format tag
apps/nsq_to_file: supported rotate by size & interval

ADD:
--rotate-size=0,        rotate the file when it grow bigger than `rotate-size` bytes
--rotate-interval=0,    rotate the file every duration

CHANGE:
1. rename <GZIPREV> to <REV> in filename format for the new featrue
2. `Sync` before `Close`
3. deprecate `maxGzipRevisions`
nsqd: Switch from using win32 ReplaceFile to MoveFileEx calls during atomic_rename

* Ensure temporary diskqueue metadata files are unique
* Use MoveFileEx instead of ReplaceFile to prevent heap corruption issues
Merge pull request #509 from allgeek/atomic-rename-windows-panic

nsqd: Switch from using win32 ReplaceFile to MoveFileEx calls during atomic_rename
Merge pull request #496 from xiaost/tmp-nsq-to-file-20141109-pr

apps/nsq_to_file: supported rotate by size & interval, added <PID> format tag