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.