High court rules data retention and surveillance legislation unlawful