De-duplicate code in the mb_depends_on_* functions

Added define_library_dependency() which takes care of adding the
library and its paths and defines to the environment.

Modified the nine library depends-on functions to use
define_library_dependency().

MBDependsOnMBCoreUtils() is header-only so it does not use this
function.