Prep work for adding a `mopidy config --set ...` type command.

Adds the forward and backwards transformations we need for modifying configs while keeping comments etc.