Save the editor and language state

I decided to use localStorage rather than sessionsStorage because it is persistent over browser sessions.