implement api for retrieving insight data

Change-Id: I3840ea91118a84ead1dee4f85ad230dc23f3227b
Reviewed-on: http://review.couchbase.org/31591
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>