keep track of pending paths and ignore dupicates to fix #336

_pending shoud not be cleared until the flushed Futures complete; and we
check _pending from writeString() before setting up an
open->write->close future chain on it.  This solves the case of multiple
parallel writes to the same file with the same contents.
we remove() from _pending in the continuation after we close() the file

this means we don't need to clear _pending from flush(); in flush() we
do a toList() on the values Iterable to guarantee we won't be removing
from our active iterator
Merge pull request #345 from rmsmith/master

keep track of pending paths and ignore duplicates to fix #336