diskqueue: fewer disk syncs

This adjusts the diskqueue logic to improve it's sync strategy. Currently it syncs metadata every N iterations through the ioLoop instead of just every N writes to disk. Also when other things cause a sync, the count is not re-set.

cc: @mreiferson @ploxiln