server: Introduce command_{pre,post}_select().