Fix PrivateActionToolButton with menu not clearing checked state properly

Authored by ahiemstra on Aug 26 2019, 1:56 PM.

Description

Fix PrivateActionToolButton with menu not clearing checked state properly

Summary:
When closing the menu of a PrivateActionToolButton with a click on the
button, the checked state of the button would not properly clear. So
instead use the button's toggled signal to handle menu open/close.
Combined with a close policy where the parent is explicitly excluded we
can properly clear the checked state.

Test Plan:
Run kirigami2gallery and go to the "multiple columns" page. The menus for
the left/main/right actions should popup and close correctly when using
the buttons to close them or when clicking outside the menu. Without this
change, the menus will behave inconsistently.

Reviewers: Kirigami, mart, ngraham

Reviewed By: Kirigami, ngraham

Subscribers: plasma-devel

Tags: Kirigami

Differential Revision: https://phabricator.kde.org/D23463