Time-dependent inclusions and sweeping processes in contact mechanics