implement API for custom report types

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