First round of fixes based on cppcheck
https://github.com/fish-shell/fish-shell/issues/575
Eliminate next pointer from connection_t, turn connections into a std::list