Spain's government has secured backing from the opposition to dissolve Catalonia's parliament and hold new elections there.