Changes to chat history feature
Changes to chat history feature

This commit revises the chat history feature to work like my
terminal emulator. Specifically, when reviewing the history
with up/key, changes to the lines are now saved. This makes
the feature significantly more useful and also prevents
annoyance if the user presses up when typing a line, because
the user can now just press down to get the line back (and vice
versa), as opposed to the line being gone.

QuiteQuiet/Pokemon-Showdown-Client,sirDonovan/Pokemon-Showdown-Client,submindraikou/Pokemon-Showdown-Client,Zarel/Pokemon-Showdown-Client,QuiteQuiet/Pokemon-Showdown-Client,panpawn/Gold-Client,QuiteQuiet/Pokemon-Showdown-Client,Zarel/Pokemon-Showdown-Client,asgdf/Pokemon-Showdown-Client,submindraikou/Pokemon-Showdown-Client,Zarel/Pokemon-Showdown-Client,sirDonovan/Pokemon-Showdown-Client,panpawn/Gold-Client,asgdf/Pokemon-Showdown-Client,QuiteQuiet/Pokemon-Showdown-Client,sirDonovan/Pokemon-Showdown-Client,submindraikou/Pokemon-Showdown-Client,panpawn/Gold-Client,Zarel/Pokemon-Showdown-Client,asgdf/Pokemon-Showdown-Client,sirDonovan/Pokemon-Showdown-Client,asgdf/Pokemon-Showdown-Client