app.js: Factor out border calculation heuristic.
version.js: Bookend version change with TR.upgrading whose value is the version to which we're moving.
app.js: When upgrading to a version >= 1.4, make sure the border colour is not the same as the background colour for active, bar, body, and button theme keys.