Unless dry_run is true (in which a report is printed to stdout),
inserts the jobs into the first queue and the already_inserted
table. Returns the number of jobs actually inserted. If a job has
already been inserted in the past and force_opt and quiet_opt
are both false, no job is inserted and an error listing all the
already-inserted jobs is returned instead. Also, if the commit id
of any job is not present in upstream, returns an error without
inserting any jobs.