Make state transfer atomic.

Create a temporary data directory and store intermediate result there,
after the transferring is done, rename this directory to data directory.

The naming of data directory is like : dataN where N is the id of the
directory.
Fixed bug of RollingLog when call sync() on empty log.
Merge pull request #200 from EasonLiao/atomic_transfering

Make state transfer atomic
Associate context with callbacks.

1. Add context object to method send, flush, remove, takeSnapshot.
2. Pass context object back to corresponding callbacks.
3. Add removed callback (corresponds to remove call).
4. Pass all the pending requests context back to user in recovering
callback to notify them the (possible)failed pending requests.
Merge pull request #199 from EasonLiao/context

Associate a context with request
gh-pages: delete master directory.

publish-artifacts.sh copies the master branch documentation to a
wrong directory because the directory doesn't get cleaned up first.
Some refactoring on code.

1. Make all the processors as member variables instead of local variable.
2. Make clusterConfig as member variable instead of local variable.

Now the code looks much shorter since we don't need to pass processors
around.
Merge pull request #201 from EasonLiao/refactoring

Some refactoring on code.
Merge pull request #195 from m1ch1/master

The url of documentation in README is incorrect.
Make cluster_config file and config in log consistent.

1. Write to cluster_config first then append to log in sync processor.
2. Clean up invalid cluster_config files after synchronization in case
the cluster_config has been truncated in log and recovering from log in
case the Zab crashed between writing to cluster_config and appending
to log (it's not likey though).
Merge pull request #183 from EasonLiao/cleanup_configs

write cop to a file before appending it to the log
Use maven-release-plugin 2.2.

http://jira.codehaus.org/browse/MRELEASE-641
[maven-release-plugin] prepare release 0.3
Update README.md