Faster response to click on get-url button.

If I want to download a table of the entire database, the page takes a couple
of seconds to create the compressed url. This version just hashes the document
position into [key,id] and uses this (instead of Array.indexOf) to build the
index list.
Used 'rows' instead of re-using keys for no reason.
Introduced a bunch of spaces.

This is to show that the implicit use of [rows[k].key,rows[k].id].toString()
yields a signature compatible to documents[d].toString(). It is way more
elegant than the excessive use of JSON.parse/stringify from before, but more
intricate as well.
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 prefixing it with an underscore
and restored the original string before matching is done.
I am relying on the preservation of insertion order of object keys here,
despite that the ECMAScript standard explicitely states the opposite. However,
I feel I am allowed to do this because in this case the order is absolutely not
critical.
Moved #results just below #upload form.

It makes more sense if uploads are reverted.
Starting to employ some <label>s everywhere.

I should have read something about html forms before screwing everything up.
<label>s are a nice way to group a checkbox or radio input together with its
description and they even respond to clicks without scripting anything.
Inserted more labels into upload.html.

If the description is clicked, the associated text input gets focus, so that's
nice. This is going to be a long ass day.
Simplified style rules in upload.html.

I've always wanted to use a nowrap-class for <spans> but if every checkbox has
to be grouped with its description, the extra attibute would take away too much
space. This is why I applied nowrap to every span and added exceptions.
However, <label>s can always prevent line wrap and I exchanged nearly every
<span> with its <label>. Thus the few <span>s that are left can live with that
extra class attribute.
Added <label>s to replicator.html and improved indentation.

Indentation in html looks always messed up and I certainly can't pretend that
tags are the same as curly brackets. This one with the closing tag on the same
line as the last statement I am getting more and more fond of.
Simplified duplicate CSS definition in upload.html.
Exchanged a lot of spans with labels in map.html.

The <span> with the <select> in it makes only half-sense, but Firefox still
focuses it if I click the description. Chrome even highlights it if the mouse
hovers the description.
So not much harm at all, but I haven't dared to see what horrors IE10 will do
to it.
Changed span.types to be filled with <label>s.

The space is needed to allow line breaks after each type checkbox. That makes
the entire line a little bit broader. On the other hand the grouping makes more
sense this way.
I used $.text to initialize the label because otherwhise everyone with
write-access wants to fill it with script tags. Not on my watch.