Spain’s conservative government appeared doomed Thursday to lose a no-confidence vote in parliament, with the center-left Socialist party poised to take power.