nsqd: mark diskqueue for syncing when corrupt
nsqd: move code out of diskqueue ioLoop into functions
nsqd: add --sync-timeout for time based diskqueue fsync
nsqd: cleanup diskqueue files when we recover from tail corruption
nsqd: dont open diskqueue writeFile with O_APPEND

O_APPEND causes every write to first seek to the end of the file.
In cases where data was written to the end of a file but uncommitted
to the metadata position (due to process crash, etc.) subsequent
writes would be performed at the wrong position (we already seek()
to the commited write position when opening a writeFile)
Merge pull request #214 from mreiferson/dq_meh_214

nsqd: diskqueue cleanup