Cory Bernardi will quit politics by the end of the year