db_cluster: new parameter max_query_length

- set threshold in second after which a connection is marked inactive if
  the query fails
- allow to let connectioncs being active if the error is due to some sql
  mistake
- default is 0 (set connection innactive immediately, same behavior as
  so far)