Italy’s rival parties had to put their differences aside in order to choose leaders of both houses of parliament