Fix misprint in error message.

Populate rdeps function should complain about reverse deps not about
normal ones.
Fix analyse_elf() leaking file descriptors

This would cause pkg-check -Ba to hold a file open
for every non-elf file in the system due to not
calling elf_end()
Substitute ${ABI} in all repos.

For multi-repo world it is required to substitute ${ABI} variable
for all repos urls. This patch adds this functionality.

Reported by:	DragonSA
Issue number:	#492
Simplify logic.

Simplify recursive_autoremove by reusing remove_from_rdeps function.
Print unresolved dependencies during install.

While performing install or upgrade job it is generally a good idea
to inform user about dependencies of a package that cannot be resolved
(e.g. they are missing in a repository). However, we should also
think about possibility of package installation even with missed deps.
From my sense, -f flag is not permissive enough to use it for this
purpose.
pkg -N returns 0 on success >0 on not ready

This should not be copied to release-1.0 unless
-N support is also copied.
Allocate proper space for array.

Do not allocate MAXPATHLEN * len for an array of char * pointers.