Split the gui-dependent part of sqlate into a separate library.