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
re-license under Apache 2.0 for LG Electronics
Merge branch 'gcc-4.8' into gcc-4.7