Add dependency on glib-2.0

These days, glib is pretty much universal on desktop environments, so
link to it in order to drop most of our custom code.
Use g_build_filename()

Instead of rolling our own concat_strings().
Use g_get_home_dir()

Instead of our own function.
Use g_str_has_prefix()

Instead of our own function.
Use g_ascii_isspace()
Use g_ascii_strup()
Use g_mkdir_with_parents()
Use g_strsplit()
Use g_strfreev()
Use g_file_test()
Use g_path_is_absolute()
Use g_strdup()
Use g_malloc/g_free() consistently
Use gbooleans
Use g_printerr()

Also replace one instance of fprintf(stdout) with a regular printf().
Use a GList for configuration files
Use g_strndup()
Simplify find_dir()
Simplify saving locale file
Use g_get_user_config_dir()