move link job creation to a new set of API functions; clean up a buggy
test

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)