Added the selection of the RDBMS (either MySQL or Postgres) into the configuration file
Lock and postgresql parameters read from config file

- Add a SQL lock because of a race between offset_thread.ml and postgresqldb.ml. Lock also added to mysqldb.ml