ToolButton: Fix checkable behavior

Add autotests.

Task-number: QTBUG-31033
Task-number: QTBUG-30971

Change-Id: If82d5a9b6200e62d358ffc83e55137bab9b242c5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>