A shooting at a community event on Sydney’s coastline has triggered a sweeping counter terrorism investigation as authorities piece together the attackers’ background and possible extremist links behind one of Australia’s deadliest incidents in decades.