Fixed bug as to assigning mouse buttons to tools, where, sometimes, the
bindings where not cleanup properly before their replacements were
committed.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>