allow do_query() to return the last row id using cursor.lastrowid when asked, which saves us from re-querying the database when building the various caches
revert commit 42bb32c819; normalizing symbols made it 26x slower for import, now bug 47 is fixed
fix sxid lookups