Fixes #282 (Fix history in the console)

This fixes "Need to press <up> twice in the console". Full info in #282

When we reach the max history limit we remove an entry from the history array but aren't updating our history pointer (`previousCommandOffset`) to match.
Merge pull request #284 from axelson/patch-1

Fix history retrieval in the console