Enforce maxConcurrent limit for scripts

Use remote locks to make sure that if scripts specify a maxConcurrent
value, that no more than that value can run on a given target at the
same time.

There are a couple of TODOs in the runner code (lib/task/runner.go) that
should be cleaned up ASAP.
Update some tests and formatting