Italy qualified for Euro 2016 and kept up their unbeaten Group H record with A 3-1 victory over Azerbaijan.