save and generate selection from localstorage

Saves comma separate JSON representation of selection rects.
On reload, parse the JSON, and creates selection rects for them.