cfg: convert types automatically based on default values

The type of the config value is string by default and we need to cast it to the
appropriate type - it is error-prone.

The swift3 middleware actually knows the correct config type from the default
value in swift3.cfg and there is no need to convert it manually.

Change-Id: I28761ed12c3bdd85cb2a80048d2abc0dd23222b3
Merge "cfg: convert types automatically based on default values"