Prettified that bit where start_key and end_key are constructed.
Reorganized passed/failed arrays into hash tables.

As I experienced with previous commits, indexOf can be painful when used in a
for-loop on >1000 objects. This organizes passed and failed geometry ids into
an object that maps the geo id to true/false.
This speeds up the id look-up and it also improves source quality.
Removed another 'indexOf' in _list/bbox-filter.

This time I don't expect any increase in performance it just wastes less space.
'indexOf' would lead to comparing strings anyway, so the regex shouldn't take
much longer anyway.
Removed 'indexOf' in filtered replication.

This one might take one or two seconds on 1000+ documents. I don't really need
it, because here 'keys' and 'documents' are both sorted by the size of the
associated geometry.
Moved maxItems into autocomplete source function.

... to allow it to terminate early. If theres a lot of items and the text input
is still empty, there is absolutely no need to go though all of them.
Removed 'indexOf' in autocomplete source function.

This changes how suggestions are placed: The object keys are somehow grouped
into numbers and strings, presumably to optimize for arrays.
Fixed wrong order of autocomplete suggestions.

I've just made sure that the key is a string by adding an extra space, and then
removed that space before it is matched by anything.