cmd_rewrite.go: missed out on gatherFilters
cmd_rewrite_integration_test.go: missing declaration of `strings`
rewriter.go: changed logic around `KeepEmptyDirecoryGlobal` and the integrity of
empty subdirectories
rewriter_test.go: missing seconf parameter for `NewSnapshotSizeRewriter`.
This adds support for caching already rewritten trees, handling of load
errors and disabling the check that the serialization doesn't lead to
data loss.
The more generic RewriteNode callback replaces the SelectByName and
PrintExclude functions. The main part of this change is a preparation to
allow using the TreeRewriter for the `repair snapshots` command.
In principle, the JSON format of Tree objects is extensible without
requiring a format change. In order to not loose information just play
it safe and reject rewriting trees for which we could loose data.