Spain swears in new prime minister