Redmine #6602: Enable LMDB NOSYNC mode on hub to improve performance.

NOSYNC mode will prevent excessive fsync'ing to disk, esp. with the
busy lastseen database. This opens up to corruption issues if the
machine is unexpectedly shut down or crashes.

For the lock database we solved the corruption issue by making atomic
backups of the database and restoring it on restart, but this method
is not generic and needs to be adapted if we want to the same kind of
protection for other databases (see Redmine #6817). For now we
consider the corruption issue an acceptable compromise since a hard
shutdown is quite unlikely in serious production environments, and the
performance is quite bad in this area.

On agent nodes we keep the SYNC flag on, since they are much less
impacted by the performance problems (they do not serve thousands of
CFEngine clients), and fixing corruption on agent nodes is
operationally more work.