create initSession prototype, enhance sqlQuery

initSession should work, but still relies on the unfinished
createSession.
sqlQuery now will work for non-null-terminated C strings in the
database.