refactor: extract buildSchemas to deduplicate main.ts and cli.ts
hatk schema now inits the DB from lexicons if it doesn't exist yet,
so you can inspect the schema without running the server first.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>