Redmine #6602: Fixes for MDB_READERS_FULL errors

https://dev.cfengine.com/issues/6602

This can't be tested with the PR analyzer, since it depends on both https://github.com/cfengine/enterprise/pull/234 and https://github.com/cfengine/nova/pull/899.