query.c: Support range queries, like foo[1,5]

foo>=1 foo<=5 does not work a substitute, because duplicates with different
scores are allowed in the index.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>