centralize lib package initialization

Move the appropriate bits of func init() in sqlite.go to an exported function in lib/init.go, for example, guarded by a sync.Once.

The purpose is to avoid problems when other packages in the same program need to initialize lib as well. Also, the proper initialization is in process of changing due to adoption of pthreads started in libc.