Update segment.cc and version.cc to sqlite.