added tutorial sections about queries and error handling
updated the query demo to use locking functions; removed the overly long and confusing query example from the manual
removed the basic_api example, as it used undocumented ways of accessing the database