Output useful JSON data

If you use os-apply-config to slice out a JSON blob on the command
line you'll get back a string formatted dump of a python
dictionary (or list). Ideally we would print out proper JSON text
so that other tooling (jq, etc) can post process things in a
useful manner.

This patch updates apply_config so that if an output key is
detected to be a dict or a list it is printed to stdout
in a JSON format.

Change-Id: Ibc8b21cd6922b8664ca71e9e6009c8573ea9d107