Rework autocrap configuration for libedit/libreadline

As before, libedit is preferred over libreadline.

Fail configure if neither is found or if libedit includes are missing.
Require readline history support (as varnishadm needs it).

Previously, if only libreadline was found, all binaries were linked
against it. Now only binaries getting linked with LIBEDIT_LIBS will
get linked aginst readline if libedit is not found.

If configure succeeds, a build should not fail any longer due to
libedit/libreadline headers missing.

Fixes #1555