Fixed racing-conditions if 2 graphs ar plottet at the same time
Fixed syntax-error in gnuplot caused by using the wrong comment-char
Added gnuplot-day
Populate mesurements when data is uploaded instead of when data is requested

To much concurrency on populatemesurement seems to cause deadlocks in the database. This change optimises this by exchanging 4 populations at once when requesting the index for 1 population every minute when uploading new data
removed some duplicate code on the gnuplot-skripts, made the gnuplot-skripts use less transactions
further code-deduplication
Moved calculations of sliding averages from php to shellskript

because now generation and consumtion are in the same transaction. Before this change there was theoretical the chance that a measurement gets added to the database just after the cache was generated thus invalidating the cache and preventing the full data to reach gnuplot.
Corrected some mistakes of 21a8d7c95d0ac030e6339af84f848d12e1b97df1

Removed an unsed file

readded the sqlite-timeout
added reprocess-uploads-script