Fix bug with how currentWindow is supposed to be used.

Also, remove unused memory calculation code, and change returns from the remove
functions, to return the removed items.  Also, don't grab the returned values,
to show that the functions change stuff in-place.
Save information of the closed tabs in localStorage.