Simplified query service state machine.

Got rid of CLOSED state, renamed OPEN to SERVING to mirror the
NOT_SERVING state. Also, DisallowQueries does not take a forRestart
flag any more. Query service always returns RETRY during (and after)
shutdown.