Restore upgrade candidates filtering.

As the request processing hash has been changed, the filter for request
candidates selection turned to broken. This change restores that logic
and thus (hopefully) fixes multirepo processing.

Issue:	#1058, #1072
Fix memory leak for request items.
Fix make distcheck and building on systems without libelf
Release 1.4.0.b1
Unlink all unrelated candidates from the request.
Fix autoremove (and remove) requests.

Issue:	#1705
Reported by:	@andrejzverev
Fix bundle libelf

Tested by:	dillon
s/libpkg/external/
Dragonfly want to preserve the old ABI style
Update to 1.4.0.b2