From what I can tell `CClientUIInterface::[signal_name]_disconnect` is a no-op.

In other words calling it does *not* disconnect the slot:

For example `uiInterface.NotifyBlockTip_disconnect(BlockNotifyGenesisWait);` in `AppInitMain(...)` does not disconnect `BlockNotifyGenesisWait` as one would expect. The result being that `BlockNotifyGenesisWait` is invoked for every new block :-)

Running `bitcoind` with some debug printing added shows the issue:

```
[signals] CClientUIInterface::ThreadSafeMessageBox_connect(...) entered with 0 connected slots.
[signals] CClientUIInterface::ThreadSafeMessageBox_connect(...) exited with 1 connected slots.
[signals] CClientUIInterface::ThreadSafeQuestion_connect(...) entered with 0 connected slots.
[signals] CClientUIInterface::ThreadSafeQuestion_connect(...) exited with 1 connected slots.
[signals] CClientUIInterface::InitMessage_connect(...) entered with 0 connected slots.
[signals] CClientUIInterface::InitMessage_connect(...) exited with 1 connected slots.
[signals] CClientUIInterface::InitMessage_connect(...) entered with 1 connected slots.
[signals] CClientUIInterface::InitMessage_connect(...) exited with 2 connected slots.
[signals] Calling uiInterface.NotifyBlockTip_connect(&RPCNotifyBlockChange) in OnRPCStarted()
[signals] CClientUIInterface::NotifyBlockTip_connect(...) entered with 0 connected slots.
[signals] CClientUIInterface::NotifyBlockTip_connect(...) exited with 1 connected slots.
[signals] Calling uiInterface.NotifyBlockTip_connect(BlockNotifyGenesisWait) in AppInitMain(...)
[signals] CClientUIInterface::NotifyBlockTip_connect(...) entered with 1 connected slots.
[signals] CClientUIInterface::NotifyBlockTip_connect(...) exited with 2 connected slots.
[signals] RPCNotifyBlockChange(...) was invoked.
[signals] BlockNotifyGenesisWait(...) was invoked.
[signals] Calling uiInterface.NotifyBlockTip_disconnect(BlockNotifyGenesisWait) in AppInitMain(...)
[signals] CClientUIInterface::NotifyBlockTip_disconnect(...) entered with 2 connected slots.
[signals] CClientUIInterface::NotifyBlockTip_disconnect(...) exited with 2 connected slots.
[signals] RPCNotifyBlockChange(...) was invoked.
[signals] BlockNotifyGenesisWait(...) was invoked.
[signals] RPCNotifyBlockChange(...) was invoked.
[signals] BlockNotifyGenesisWait(...) was invoked.
[signals] RPCNotifyBlockChange(...) was invoked.
[signals] BlockNotifyGenesisWait(...) was invoked.
... and so on ...
```

Note how `BlockNotifyGenesisWait(...)` is called also after `uiInterface.NotifyBlockTip_disconnect(BlockNotifyGenesisWait)`.

I think the problem is that the `disconnect(...)` member function of `boost::signals2::signal` expects a function pointer to be passed in (the same that was passed to `.connect(...)`), but we're doing:

```
void CClientUIInterface::signal_name##_disconnect(std::function<signal_name##Sig> fn)
{
    return g_ui_signals.signal_name.disconnect(&fn);
}
```
boost::signals2::signal<CClientUIInterface::NotifyNumConnectionsChangedSig> NotifyNumConnectionsChanged;
    boost::signals2::signal<CClientUIInterface::NotifyNetworkActiveChangedSig> NotifyNetworkActiveChanged;
    boost::signals2::signal<CClientUIInterface::NotifyAlertChangedSig> NotifyAlertChanged;
    boost::signals2::signal<CClientUIInterface::LoadWalletSig> LoadWallet;
    boost::signals2::signal<CClientUIInterface::ShowProgressSig> ShowProgress;
    boost::signals2::signal<CClientUIInterface::NotifyBlockTipSig> NotifyBlockTip;
    boost::signals2::signal<CClientUIInterface::NotifyHeaderTipSig> NotifyHeaderTip;
    boost::signals2::signal<CClientUIInterface::BannedListChangedSig> BannedListChanged;
} g_ui_signals;
#define ADD_SIGNALS_IMPL_WRAPPER(signal_name)                                                                 \
    boost::signals2::connection CClientUIInterface::signal_name##_connect(std::function<signal_name##Sig> fn) \
    {                                                                                                         \
        return g_ui_signals.signal_name.connect(fn);                                                          \
    }                                                                                                         \
    void CClientUIInterface::signal_name##_disconnect(std::function<signal_name##Sig> fn)                     \
    {                                                                                                         \
        return g_ui_signals.signal_name.disconnect(&fn);                                                      \
    }
ADD_SIGNALS_IMPL_WRAPPER(ThreadSafeMessageBox);
ADD_SIGNALS_IMPL_WRAPPER(ThreadSafeQuestion);
ADD_SIGNALS_IMPL_WRAPPER(InitMessage);
ADD_SIGNALS_IMPL_WRAPPER(NotifyNumConnectionsChanged);
ADD_SIGNALS_IMPL_WRAPPER(NotifyNetworkActiveChanged);
ADD_SIGNALS_IMPL_WRAPPER(NotifyAlertChanged);
ADD_SIGNALS_IMPL_WRAPPER(LoadWallet);
ADD_SIGNALS_IMPL_WRAPPER(ShowProgress);
ADD_SIGNALS_IMPL_WRAPPER(NotifyBlockTip);
ADD_SIGNALS_IMPL_WRAPPER(NotifyHeaderTip);
ADD_SIGNALS_IMPL_WRAPPER(BannedListChanged);
bool CClientUIInterface::ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style) { return g_ui_signals.ThreadSafeMessageBox(message, caption, style); }