target.mk: add support to early scan of default package configuration
There is currently a problem with how some option that modify default
package configuration are parsed.
When the DEFAULT_PACKAGES list is composed, DUMP is used. Using DUMP
disable the loading of .config to remove and modification done by the
user to prevent any kind of conflict or strange thing one creating all
the info for each target. Because of this, .config is never parsed and
any check to CONFIG doesn't work (for the first creation of .config).
Later image build will check what is set in .config and the default
package list won't be parsed anymore.
This is problematic for some config that are OK to parse, for example
SELINUX or USE_APK.
To better handle them add some logic when DUMP is used to selectively
parse these option if present in a to-be-init .config so that option are
correctly parsed and DEFAULT_PACKAGES is correctly set.
Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>