Rework config file location

Implement IPFS_CONFIG_DIR and refactor code to make it simpler. Fix bug in `-c` option handling in `init` subcommand, and add `-c` support to `config` subcommand.

Also add `ipfs init` `-d` option to change default datastore location when initializing ipfs.
How would you check that, checking if a directory is readable is not that easy. I can run os.MkdirAll and check it works though. I could also try to create a file in it.