Changes to uploader to reflect data format changes.

Changes:
- Use 'title' field instead of the key for locationText and personText
- Read the span for a person from the 'span' field instead of the whole value
- Don't upload the 'html_fragment' field at all

This could need further changes if I missed something here.
Automated query testing.
Fixed bug that broke pagination when when no limit on results to count over was set.

I discovered this in regression testing. It should only have effected the querydb tool and not the actual backend (where limits are set by default).