Mouse fixes

- Helps fix mouse coordinate accuracy. There may still be some drift, because the drawing code is using fractional coordinates (which will be fixed when I overhaul the OS X port).
- Fixes a problem with mouse clicks and the equipment screen with empty slots.