Copies stumble logs into the sdcard instead of deleting them

This is an incomplete patch for #1255, but I just wanted some code that merges cleanly.

This *mostly* works, except that there is a set of logs that are stored only in memory.  Whenever the save logs to disk flag is enabled, we must flush those memory buffers to disk, then do the regular upload thing.