Make query limit work.
query results sorting by range alphabetically even when the range is an int [Delivers: #42149079]
If the value of range is 0 there will be no range attribute.
Merge pull request #5 from exfm/limit

Fixes query.limit and query.reverse.