build: Massively reduce time to determine dependencies

In packages providing multiple .so's (such as iptables) - we previously
recalculated every dependency for every LSB shared object (or executable)
which added an enormous amount of time to dependency resolution (as using
FilesDB just isn't that fast, unfortunately)

We now cache binary and pkgconfig dependencies, which makes sense as many
files will depend on the same set of files (i.e. ncurses, glibc, etc.) -
also we ensure we do not attempt to check for files that still appear
to be linked within the working directory (i.e. rpath weirdness, pre
ldconfig) - as looking up files that *aren't* installed takes far longer.

Long story short, package build time drops drastically as each dependency
only needs to be resolved once now.