master: Fix a bug in a code handling chunkserver's errors

This commit fixes the issue with metadata checksum mismatches generated
by chunk_emergency_increase_version function. It was calling a function
which writes changelog entries (fs_incversion) before making the
checksum of the filesystem up to date. The bug is being fixed in this
commit by reordering instructions in chunk_emergency_increase_version.
A new test is also introduced -- it verifies if the system works
properly when chunkservers fail to do some operations on chunks
(e.g. creating new chunks, replicating existing).

Change-Id: I5cdd20624fc1921b1fe388a605caa91807dbde77