Socialists ousted in Portugal election