MB-8582: Refactor out should_filter/1

Whether to filter or not depends on the view query parameters.
As those parameters are indexer specific, you need to call out
to the indexer to determine its value.

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