Restructured jobs.py in preparation for multiprocessing

The needs_update flag is interpreted to mean "needs to update ESD".  If it
is cleared, we still mean the needs_update_events flag to mean "needs to
update event histograms".
Split building ESD in two parts

The first part processes events and stores the results in a temporary file
(as previously), but *returns the filename and node path*.  The second
part then takes the filename and node path and copies the node to the ESD
and removes the temporary file.

Splitting the work in two parts enables us to parallelize the processing
while copying all nodes sequentially.
Weather ESD is now split in two parts
Refactored jobs for better processing / store ESD separation

For each summary, all types of events (HiSPARC, weather, etc.) are
processed and temporary ESD data is stored.  The locations are aggregated
and returned.  Then, the data is copied to the ESD.
Use multiprocessing to generate ESD data

A worker pool is created (cpu_count() number of processes) to process
events and create the temporary ESD data.  Whenever a worker finishes, the
data is moved by the main process into the ESD.  So now we have
concurrency for the cpu-intensive processing of events, and only one
process which writes to the HDF5 files.
Histogram creation also uses multiprocessing
The Multiprocessing Meltdown Restoration Project

Of course, it was too simple.  Testing on MySQL uncovered too much shared
state in the child processes.  In particular, the database connection was
shared.  That is mitigated by calling django.db.close_connection() in the
child processes.  Also, map_async behaves more eratically than
imap_unordered (and waiting for the results).  I do not know why, and it
bothers me.  This commit fixes things and all should be well.