sql_logbook(): add disambiguation rule
fix broken cookie support check in sql_store_persistent_vars()
cosmetics, debug code