update-alternatives.bbclass: Add function to get metadata
This adds update_alternatives_alt_targets function to get the metadata
for a package. This is for code reuse because the metadata would help
other classes that needs to be aware of how update-alternatives modify
the final package.
[YOCTO #12597]
[YOCTO #13238]
Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>