Spanish Prime Minister Mariano Rajoy says his government will go to the Constitutional Court to challenge a Catalan resolution to secede from Spain.