SHDP-342 Support append in store writers

- Contribution by Liu Jiong <dliu@gopivotal.com>.
  This PR is merged via a new cleaned PR. Some
  changes to white spaces and other code formatting.
- Writers can now be configured to be on an append
  mode which with a timeout will flush stream using
  hflush() which should make a data available without
  closing a stream/file.