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