MB-10711: Datatype adjustment for legacy clients

New engine API, for memcached to update datatype,
in case of legacy clients

For Unknown commands:
- SET_RET_META
- ADD_RET_META
- SET_WITH_META
- ADD_WITH_META
check if document is JSON, if datatype is set to
RAW_BYTES, once before going ahead with the operation.
If the document were JSON and the datatype indicates
otherwise, adjust the datatype.

Change-Id:I5ffdd66062ceba79306495fa1c94e7f311a77150
Reviewed-on: http://review.couchbase.org/35170
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>