Initial changes for WAL.

Integrated WAL with BucketManager.
This does not need to be here. It can be done with operations already available. Also, copying from one stream to another might be available as utility in existing libraries that we already depend on (IOUtils or similar). Can you check?