Simplified field selection in _list/export.
Added JSON representation for XML/GeoJSON export.

This will serve as a tool to copy entire documents inbetween spreadsheets.
Changed upload.html to accept multiple files.

This apparently needs work because all but the first are ignored.
Worked around confusing local var names.
Merged _JSON into doc and removed it from properties.

I am too lazy to implement my own deep merge, so $.extend has to suffice. Also
this happens before flat-hierarchy properties are merged into the document,
because this way the user may overwrite the template with custom values.
Fixed missing _JSON in _list/export.

... when include_JSON and filetype=xml that is.
Revert "Simplified field selection in _list/export."

This reverts commit f08cec1fc770860dc0d257d9280fc470fa7bd36e.
Because there is also doc.time, doc.type this doesn't work.
Removed another global JQXHR.
Fixed occasional bad geometry relay.

This happens when for instance all documents of the same geometry are deleted,
i.e. the geometry source document and all clones.
Purged orphaned geometries from geometry list.

Actually there can't be any orphaned geometries (that is, documents with no
type and a GeoJSON to which no other document refers to), BECAUSE THE UPLOAD
PAGE PROTECTS THE DATABASE INTEGRITY!!!! AT 1000%!!!
Nevertheless the map page shouldn't end up in an infinite loop and I can't
believe this is patch level 11 already.
Don't know what this was supposed to explain.
Removed local 'id' from _view/geojson to reduce maintenance.
This allows line #%-comments in GeoJSON_clone.

I figured if documents link to 50+ geometries it could be nice to be able to
add a hint, because that would make these large lists more manageable.
Simplified _list/tabulate using type inference.
Merged two #upload change handlers into one.
Be more stringent about Content-type.
Moved feature purge into $('#upload').change().
Moved geometry purge into $('#upload').change().
Moved finalization into $('#upload').change().

That is, fetch existing documents, set-up form elements, relay_geometry(). It
needs to be a function because files as well as the url use callbacks, so it
can't just go to the bottom of $('#upload').change().
Improved $('#upload').change() to handle multiple files.

I don't see any advantage in loading all files at once, so I've chained the
reader.onloads together like this.