Inherit from tools::WeakBase non-virtually, so that we can use a
static_cast in tools::WeakReference::get instead of a dynamic_cast.
This takes the file-open time from 1m21 to 40s for me.
Add a clang plugin to make sure we don't accidentally end up inheriting
from tools::WeakBase more than once.
Reviewed-on: https://gerrit.libreoffice.org/71231Reviewed-by: Noel Grandin <email@example.com>
Tested-by: Noel Grandin <firstname.lastname@example.org>