LUCENE-5979: Use the cost API to decide on whether to use random-access to intersect queries and filters.


git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/branch_5x@1629599 13f79535-47bb-0310-9956-ffa450edef68