A simplistic query limit implementation

I'm not entirely sure whether this is the best solution. Especially the `riemann.index/search` change feels wrong. But it shows signs of working, so I'm submitting it for consideration, even if there's quite a bit of work left to do.
I think all you need to do to get the right parse tree out of this (putting limit at the top) is to pull the limit expression out above the equal/not-equal/etc into a higher level rule.