Newcastle clinch the Championship title with victory over Barnsley, after Brighton concede a late equaliser at Aston Villa.