Makefile: refactor lookup of pkg build rules and deps

Introduces a LOOKUP_PKG_RULE function that matches generic rules
from targets specified along the lines of:

triplet.lib-type.debug.treading.exceptions.my.experimental.version

Current build rules will be matched according to the current logic
(pkg-target --> pkg) and future variants can use "targets" as both
functionality determinants and a directory separator for multiple
side-by-side variants.
mxe configury: build native pkgconf and centralise various conf files
Makefile docs and pkgconf: add support for shared|static variants