Fix unexpected brushReset behavior.

Calling brush() on brushReset leads to __.brushed being set to an empty
array. As a result, a call to render() would lead to an empty ||-coords.
This commit implements (AFAICS) the correct behavior for brushReset. It
sets __.brushed to false and calls render() in stead of brush() when the
g.dimensions are updated.
Fix some issues with the resize function.

Although it still doesn't keep the brush on resize, it at least now
properly resets the brushes before it gets in a completely messed up state.
It also checks the flags to reinitialize properly shadows, brushable, and
reorderable after a resize based on the actual settings.
Merging brush reset bugfixes