Thomas, Cavendish crash as Demare wins 4th stage