Bring in the MODULE_DEPEND() and DECLARE_MODULE() macros from FreeBSD-5.x.
Instead of trying to bring in the 5.x kern/kern_loader.c and related code,
which is a huge complex mess, instead properly declare the miibus module
and check preload files against static in-kernel modules and ignore any
preloaded modules that arleady exist in-kernel based on DECLARE_MODULE()
matching up.
This solves a problem where the bootloader attempts to load module
dependancies along with their modules (e.g. if if_fxp is loaded then miibus
is also loaded). If the kernel already had a miibus module built in this
resulted in two miibus modules which resulted in a crash.