Major files refactoring - swarming.

- Split main from handlers declaration for endpoints handlers.
- Remove unnecessary imports.
- Remove APP from mapreduce_jobs, it unnecessary.
- Stop the forced logservice flushing, it's stable now.
- Remove appstats, the new Clout Console Trace features can give meaningful data
  without require intervention from within the app.

Review URL:
7 files changed