lib: Fix a shutdown crash with "clustering = yes"

This is a bit confusing now, sorry for that:

register_msg_pool_usage() in the ctdb case uses
messaging_ctdb_register_tevent_context(), which talloc_reference()s
the central struct messaging_ctdb_fde_ev of the
messaging_ctdb_context. In messaging_reinit(), we talloc_free only one
of those references and allocate a new messaging_ctdb_fde_ev. The
remaining messaging_ctdb_fde_ev should have been deleted as well, but
due to the second reference this does not happen. When doing the
shutdown messaging_ctdb_fde_ev_destructor() is called twice, once on
the properly reinitialized fde_ev, and once much later on the leftover
one which references invalid data structures.

By the way, this is not a problem with talloc_reference(), this would
have happened with explicit refcounting too.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Tue Feb 18 13:05:53 UTC 2020 on sn-devel-184

(cherry picked from commit f1577c2b)
40 jobs for vl/1d996bb57b3 in 68 minutes and 50 seconds (queued for 3 seconds)
Status Name Job ID Coverage
  Build
passed centos7-samba-o3 #441734390
docker shared

00:36:31

passed centos8-samba-o3 #441734392
docker shared

00:37:30

passed ctdb #441734334
docker shared

00:41:11

passed debian10-samba-o3 #441734384
docker shared

00:35:31

passed debian9-samba-o3 #441734381
docker shared

00:34:52

passed fedora29-samba-o3 #441734393
docker shared

00:35:24

passed fedora30-samba-o3 #441734394
docker shared

00:37:46

passed fedora31-samba-o3 #441734395
docker shared

00:37:41

passed opensuse150-samba-o3 #441734386
docker shared

00:40:30

passed opensuse151-samba-o3 #441734388
docker shared

00:38:18

passed others #441734301
docker shared

00:15:20

passed samba #441734304
docker shared

00:25:46

passed samba-ad-dc-1 #441734356
docker samba-ci-private

00:48:12

passed samba-ad-dc-1-mitkrb5 #441734365
docker samba-ci-private

00:39:19

passed samba-ad-dc-2 #441734324
docker shared

01:08:48

passed samba-ad-dc-3 #441734326
docker shared

00:52:10

passed samba-ad-dc-4 #441734327
docker shared

01:07:13

passed samba-ad-dc-4-mitkrb5 #441734343
docker shared

00:56:12

passed samba-ad-dc-5 #441734328
docker shared

00:48:07

passed samba-ad-dc-6 #441734329
docker shared

00:39:54

passed samba-ad-dc-backup #441734345
docker samba-ci-private

00:57:07

passed samba-ad-dc-ntvfs #441734338
docker shared

00:56:47

passed samba-admem #441734322
docker shared

00:30:22

passed samba-admem-mit #441734341
docker shared

00:26:59

passed samba-ctdb #441734336
docker shared

00:24:21

passed samba-fileserver #441734352
docker samba-ci-private

00:27:10

passed samba-fuzz #441734332
docker shared

00:35:38

passed samba-ktest-heimdal #441734354
docker samba-ci-private

00:17:31

passed samba-libs #441734330
docker shared

00:36:21

passed samba-mitkrb5 #441734306
docker shared

00:22:56

passed samba-none-env #441734308
docker shared

01:02:18

passed samba-nopython #441734311
docker shared

00:34:57

passed samba-nopython-py2 #441734316
docker shared

00:44:48

passed samba-nt4 #441734358
docker samba-ci-private

00:52:48

passed samba-schemaupgrade #441734362
docker samba-ci-private

00:29:17

passed samba-simpleserver #441734347
docker samba-ci-private

00:19:17

passed samba-static #441734331
docker shared

00:52:35

passed samba-xc #441734319
docker shared

00:08:19

passed ubuntu1604-samba-o3 #441734378
docker shared

00:33:10

passed ubuntu1804-samba-o3 #441734369
docker shared

00:34:51