various changes from March 2013

This is mostly GL tile engine stuff, but it also adds facilities to the core
engine to determine whether a tool will succeed before actually using it.
That lets the UI do things like changing the cursor color to red if a tool
can't be used and blue if it can.