[conf,tool] implement configuration writer

Now ``luaotfload-tool --dumpconf`` can be used to output the current
configuration to a file.