WIP: complete architectural revamp

- modal CLI (porcelain, plumbing)
- local caching
- templating (including explicit list of fields)
- filtering of results
- ordering of results
- etc.

More cleanups to follow.