Refine debug log output in hopes of clues to why test fails on Aches.

(cherry picked from commit 349c77433f71489a9dc55c0f8ce46bdca329aa4e)
Add some debug output to laterthan.cf

... so we have some clue as to what's failing.

(cherry picked from commit 2483a513a056c11e65e5724ea90ba6f992dddd6a)
Advance ap if socket(2) fails

In the case where socket(2) fails in SocketConnect, ap will advance,
causing an infinite loop.

https://dev.cfengine.com/issues/6560
(cherry picked from commit d119322e0b6ad5061670839dffb954b4708331ef)