A man who shot three people at a Zurich mosque on Monday is dead, police said.