shell-ini-config: fix subtle section parsing bug

The shell-ini-config function was broken in a subtle way. Once we
encounter [section] tag that matched the requested section, we enabled
reading each line and returning the config setting that matched.
In the case where the requested section did not have a defined value,
but the value was defined in a section below the requested section in
the configuration file, we erroneously return the value from a different
section.

This patch fixes the bug by disabling section processing whenever we
encounter a new [section] tag. This fix also allows the same section
multiple times, which is probably not very useful but shouldn't cause
any issues.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
shell-ini-config: add ini_config_is_set() function

Due to the way that a variable is returned, it is not possible to
distinguish between a value that was set but is empty, or a value that
was never set. This prevents some possible logic on the configuration
file, including the ability to allow defaulting options. Some
configuration values might be legitimately set to null to (for example)
disable an option. This patch adds ini_config_is_set() function which
will return a 0 exit status if a match was found, and a non-zero exit
status if a match was not found. This allows determining the difference
between a set empty value versus a value which was not set at all, which
was not possible with ini_config_get() alone.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>