CMS-2356 Make XContentBuilder use IndexDocument directly

Added test for OrderByValueResolver, using spock as an experiment