Great Britain won gold in the team cycling event, setting a new world record time in the velodrome.