[interface] Default to calling intf_restart() in response to intf_close()

If an object interface does not provide an intf_close() method, then
default to calling intf_restart().  This allows static objects to
safely ignore intf_close(), without needing to add code solely to
ensure that the interface gets unplugged.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[job] Allow job_progress() to return an ongoing job status code, if known

Some background jobs have a meaningful ongoing status code (e.g. the
current link status for a job waiting for a network link to come up).
Allow this to be exposed via the job_progress() method.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[monojob] Add timeout parameter to monojob_wait()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[monojob] Report ongoing job status as overall return status on timeout

If a job times out then use the most recent ongoing error status
reported via job_progress() (if available) as the overall return
status.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[cmdline] Rewrite "sync" command to use monojob_wait()

Signed-off-by: Michael Brown <mcb30@ipxe.org>