Production grammar for documents.
Serialize log output.

- Added `printch` channel for index-shell, to serialize logs from multiple
  programs stdout/stderr.
- Added `quit` channel for gracious quit.
- refactored program.Kill() calls.
- log formatting.