Refactored testNullIndexing test and moved from QueryAdvancedTest into QueryIndexingTest.
Replaced execution time checking with invocation count checking using Mockito.
Counting how many times fields are accessed when using indexes and how many times when not.
Refactored testNullIndexing test and moved from QueryAdvancedTest into QueryIndexingTest.
Merge pull request #4088 from ajermakovics/maint/test-null-indexing

Tests for queries with indexes on null fields (backport)