Heavy updates to EmacSQL backend.