dnsdist: Prevent users from opening the same LMDB twice
As noted by Peter: "LMBD requires that database is opened
exactly once per process. Opening multiple times breaks file
locks silently, which leads to corrupting the database."
While I don't expect users to actually do that, we already have
a nice helper function to prevent this mistake in the lmdb-safe
code base, so let's use it.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
0cfa000e3f7a47c96a3129d5ef27ce13022707f6)