Replace isinstance checks for specific CursorTools with hasattr

Perhaps the lesser of two evils here, as suggested by @totycro
Fixes #2051  Pressing Esc in resource overview bar crashes
Merge pull request #2063 from unknown-horizons/2051

Replace `isinstance` checks for specific CursorTools with `hasattr`