Bill Cosby’s defence lawyers win key rulings from retrial judge