Italy stalemate ends as Mattarella re-elected president