(PUP-665) Setting nil reverts to default

The behavior of looking up settings was not entirely right from the
previous commit. The true behavior is:
  * Search through layers in the order of [cli, memory, environment,
    run_mode, main, application_defaults]
  * Find the first layer that has ever had the setting manipulated for
    it.
  * If the value for that layer is not nil use that value.
  * If the value for that layer is nil use the value from puppet's
    defaults.

This commit restores that behavior and adds a test to check that it
happens.