Clean up orphaned tasks logs

Addresses #229

Without this, tasklogs will accumulate over time and eventually fill up
the master's disk.
Get pre-assigned agent counts in main job query

This saves us one query per job, which in this particular case is a big
deal. With sqlite and 1050 jobs, the reduces the scheduler's runtime
from > 2 minutes to < 10 seconds on my machine.
Index suitable agents for jobtypes

This saves us a lot of manually checking whether a given agent will be
able to run a given job. Since these checks require one database query
per job, the resulting speed-up can be significant.

This is particularly obvious when there are some agents in the farm that
cannot run most kinds of jobs and will often sit idle while the rest of
the farm is busy.
Work only on running jobs by default

Queued jobs will only be queried when it is time to start a new one.
Remove check for zero tasks

When the master is under load, this check hurts more than it helps. When
it isn't, it doesn't matter anyway.
Fix syntax error
Remove some debugging logs with too much output
Add a log statetment on scheduler finish
Fix a comment
Fix JobQueue.path(() with empty name
Fix import order
Move imports to the top of the file
Handle ENOENT when deleting task logs
Simplify log message, use logger for formatting
Don't use built-in name file for variable name
Import ENOENT symbol
Rename file-filepath everywhere
Use a two-column layout for displaying a job

This way, a user won't have to scroll all the way down first to get at
the list of tasks.
Fix one more occurence of "file"
Reverse how columns in JobDependencies are used

They were used in the wrong before. Since everything used the children
and parents relations until now, this never mistake actually manifested.

Unfortunately, this is a non-backwards compatible change. All entries in
the job dependencies table will have to be manually reversed once.