Try to avoid "attempt to erase from container with a past-the-end iterator"

I saw such an error (and the resulting abort) in CppunitTest_sw_ooxmlexport,
and the helpful backtrace displayed (it was on Linux) indicated it was caused
by the erase() call in SfxListener::RemoveBroadcaster_Impl(). (Obviously this
was when building against the debugging C++ runtime, i.e. --enable-dbgutil.)

Unfortunately this seems to be one of those random error conditions that are
hard to reproduce. At least I could not. But this is hopefully an obvious
improvement.

Change-Id: I0f247cf8f9fd0c151aafa59c43a49c100c518f19