A Survey of Proper-Motion Stars. VI. Orbits for 40 Spectroscopic Binaries