Fix checkbox toggle for tool use.

Apparently the 'checked' property is removed by the browser on click, before
I can manage to call e.preventDefault() on the event. So we are stuck with
flipping the sign of the 'checked' when the input is clicked directly.