annotationtoolbartest: Remove unneded cast
Also allows us not to compile a ./part/toggleactionmenu.cpp in the test, which seems to fix the crashes in freebsd, makes some sense since we end up with two ToggleActionMenu in the test, the one provided by the okularpart library and the other compiled in