Training Connectionist Networks with Queries and Selective Sampling