In the process, add some tests and do some renaming on the existing ones, and
remove the workaround for #2228, will be solved appropriately in a follow-up
commit.
Fixes#1836
Since the modules are going to be installed into the initfs, it makes
sense to use a more verbose naming for the file. Otherwise there's the
risk of getting confused with other type of module files that exist in
device packages.
Fixes 65be0d7e81
Kernel subpackages may contain a "-" (e.g. -kernel-mainline-modem);
replace it with an underscore to make sure that we find the
kernel-specific variables in deviceinfo.