It was not clear who was behind the episode, but Denmark’s prime minister called it the “most serious attack so far” on the country’s infrastructure.