implement insight selectors

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