Clarification on the best practices for using the _bytes() APIs.
Change sqlite3_value_blob() to force the representation to be purely
a BLOB and not a dual BLOB/String.  Ticket #2360. (CVS 4005)

FossilOrigin-Name: cf2dd45b58380de7f3e167b5357848d12872caa3
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index 91fb9a9..56c0ba0 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -38,9 +38,9 @@
   Mem *p = (Mem*)pVal;
   if( p->flags & (MEM_Blob|MEM_Str) ){
     sqlite3VdbeMemExpandBlob(p);
-    if( (p->flags & MEM_Term)==0 ){
-      p->flags &= ~MEM_Str;
-    }
+    p->flags &= ~MEM_Str;
+    p->flags |= MEM_Blob;
+    p->type = SQLITE_BLOB;
     return p->z;
   }else{
     return sqlite3_value_text(pVal);