(PUP-1839) Flush cache when setting value

The `set_value` method was deprecated and rewritten as part of the work
to implement `puppet config set`. However the new implementation lost
the call to `unsafe_clear_cache` which caused any set values to not show
up if the setting's value had previously been read. Also, the method was
still used by the `puppet device` code.

This is a small fix to get `puppet device` working again. This flushes
the cache and removes the deprecation.
Merge pull request #2409 from zaphod42/issue/master/pup-1839-incorrect-settings-when-using-puppet-device

(PUP-1839) Flush cache when setting value