Madrid has dismissed the Catalan government, taken over the administration and called a new election.