Tracking nuclear wave-packet dynamics in molecular oxygen ions with few-cycle infrared laser pulses