store: change Stream API and key type string->[]byte

Here are logic steps that caused this CL:
1) returning strings/slices that point to buffers allocated on C heap
   as a result of Stream.Value() doesn't look like a good idea because
   the stream may be cancelled concurrently but the underlying buffers
   should not be freed while they are in use, so it's better to copy
   buffers from C heap to Go heap;
2) to avoid multiple allocation/deallocation of buffers it should be
   possible to reuse buffers when iterating through the stream, to do it
   we can pass a slice that would hold key/value;
3) in order to reuse buffers you have to use []bytes, not strings, so
   the type of key is changing from string to []byte
4) updating other methods to match this logic.

This change consists of two parts: store/model.go API change and updates
across the codebase to pass the tests.

Change-Id: I8a99e5ccfa36226d389b0d34a3c338da12f0d65a
9 files changed
tree: b4842095b2eb468d555cc5345ab026c15a0c1a46
  1. v23/
  2. x/
  3. .gitignore
  4. AUTHORS
  5. CONTRIBUTORS
  6. LICENSE
  7. PATENTS
  8. VERSION