Newcastle leapfrogged Southampton in the Premier League thanks to a 4-2 victory in a thrilling encounter at St James' Park.