Added database locking while client is running
	modified:   database/sqlite.c
Changed commit logic
	modified:   client.c
	modified:   database/sqlite.c
	modified:   database/sqlite.h