UBS to cut 10,000 jobs as it posts third quarter loss