scheduler: finish implementation of targeted jobs

Targeted jobs are supposed to be like regular jobs
(in terms of replication and error handling)
except they're restricted to a particular host/user/team.
Job instances are created by the scheduler
(when it's contacted by a qualifying host)
rather than by the transitioner.

However, this wasn't fully implemented.
In particular, the scheduler needs the same logic as the transitioner
to decide whether to create a new instance: namely, whether
wu.target_nresults > nunsent - ninprogress - nsuccess

Also, the scheduler shouldn't send an instance if the WU had an error
or was cancelled.