Refactor: libs, tools: Get rid of strdup in glib lists where possible.
A lot of these lists don't need to have a string strduped into them
(which means we later have to also free that memory) because they're
just constant strings. Instead, store the consts and then free just the
list part of memory later.