Adds a function reduce_pass_size which removes duplicated files between layers. A duplicate file is a file with same path, size, mode, owners and content on 2 related layers.