beaker-sync-tasks: fix issues found during testing.

Also changes a number of other things:

1. Adds a --debug option, which is used to adjust the logging level.
2. Add timestamp to log messages
3. Done away with ThreadPool, to enable sequential task processing, upload
   and error reporting (and hence diagnosis)
3. Add a task uploaded count.
4. Misc. other clean up.

Bug: 912205
Change-Id: I541ec09f94ff0d3df7472171010b98e46ffeb7e7
Merge "beaker-sync-tasks: fix issues found during testing." into develop