MB-10468 determine document type within view engine

If the doc is non-json, it will set the set the content_meta
correctly and will convert it to base64 before passing to map
function.

Change-Id: I39ea7932152b88763aa5064dee27da0967f4a745
Reviewed-on: http://review.couchbase.org/34920
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>