master: Fix bug in calculating metadata checksums

Due to a bug chunks removed from master's structures still existed in
metadata checksum which lead to wrong CHECKSUM changelog entries to be
generated. This commit fixes the issue by modifying the way that
checksum of metadata of chunks is calculated, so that both the master
server and shadow masters will properly update their metadata checksums.

Change-Id: I00519507761cc4ddb845dd14699901f9479593b7