Peter Dutton has introduced legislation that would retrospectively validate a police agency's use of coercive powers ahead of a High Court challenge.