master: Make ChunkGoalCounters more memory efficient

Modify this class not to occupy any additional memory if only files with
the same goal were added. This will result in smaller memory usage by
the master server if snapshots are used and goals of snapshots aren't
changed after creating them.

Change-Id: I13b5d26fc1089dab062c44c005640142b5caa708