Tagged load_features.ogr2ogr if plugin is installed.
Changed wording (it sounds cooler!!!).
Inserted a blank line before the first $.get().
Restructured some control flow for CouchDB-ogr2ogr.

The 'i' flag isn't really needed if filetype is converted to lowercase before
pattern matching is done. This removes /^xml$/i.test(filetype) as well. If
Couch-ogr2ogr is installed and an unknown extension is encountered, load_next()
diverts to the block that has no effect for now.
Added Base64.encode() from _utils/script/base64.js.
Sorted input files into ogr2ogr_uploads object.

Hence ogr2ogr_uploads is structured as { <basename> : { <extension> :
<content>, etc. }, etc.} and content is a base64-encoded binary.
I assume that everything that was sorted into the same basename belongs to a
shape file blob. This makes it impossible to upload for instance my-data.kml
AND my-data.sqlite at the same time, and then expect the upload page to
recognize these as two different feature collections.
It's not my fault, it is ESRI's fault. They came up with a stupid concept of
having a file for (not even spatial) index and for the dbase and for geometry
and for the projection definition.
ESRI you've ruined the world for everyone!!!!!
Forwarded each ogr2ogr upload to _ogr2ogr until depletion.
Provided local function compose_error_message().
Changed dataType to text for JSON.parse().

Otherwise it would parse {}.toString() and fail.
Combined a few jQuery selectors and fixed a bad $.html().
Switched to built-in Error objects.
Changed .xml to require at least one <Table>...</Table>

At least this rules out some of the other .xml files.
Rethrew errors in order to halt $('#upload').change().

Otherwise it tries to read more and more files or something. The error objects
end up in the browser console as an explanatory hint, which works for me.
Escaped tags in error messages from the XML parser.
Disabled re-formatting of JSON.parse error messages.

Unfortunately, while this works in Chrome, FF already prefixes the message with
'JSON.parse: ' (as every browser should). Thus I dropped it for simplicity.