[db] keep script state in static variable
[db,log] add low-noise terminal logging
[log] use Lua io.* instead of texio.* when writing to terminal
[db] reduce noise of status logging