Simple localStorage / sessionStorage supporting objects and arrays. Falls back to storing temporarily in memory for ancient browsers.