handle sequence and sandwich overflow

- sandwich had an issue in SeekToLast for last slice of sandwich
- sequence had no correct handling for allocation and thus sometimes
  even caused and assertion failure
- note that as a side effect there is a slight performance degradation
  in SandwichDB::cook