MB-8582: Make debug_info/3 and debug_info/4 indexer agnostic

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