lib/WorkBook.js: refactored .write method to .writeToBuffer and .write

Thus one could get the buffer that was generated by xlsx before it would be written out. Which is useful for when one would want to write it out to an alternative stream.

We use it in our project to write multiple excel files directly to [zip-stream](https://github.com/ctalkington/node-zip-stream) entries.