Fix clear method skipping key-pairs

All keys belonging to the namespace are found before key-pairs are removed from storage.  This keeps the iteration in sync with the actual index of each element in localStorage.