dbquery: possibility to query DB slave
- Introduces possibility to run certain queries on DB slave. Set CFG_DATABASE_SLAVE to use this facility. Useful in case of DB replication in order to dispatch selected SELECT queries onto DB slave, liberating DB master. (closes #1100)