media/console/console.js: Rewrote console history storage, browsing, and updating algorithm. This fixes usability problems with the old one (it didn't store the current line, for instance). The new algorithm lets you edit historical items and remembers all edits until you press return. This mimics the GNU Readline algorithm as closely as I can tell.