Voters will be required to number at least five parties above the line in order of preference after bill passed upper house 33 votes to four