Improve smashing

What started as a quick fix to allow double-smashing to clear windows turned into a refactor of map::bash(), scattered code cleanups, and several bugfixes.