Australia had been trying to deport two men under laws that allow a convicted criminal's visa to be cancelled