Socialist party leads Spain’s general election after nearly all ballots counted