Use std::forward_list where possible

std::forward_list is a singly-linked list, which is more efficient and
has lower memory overhead for elements (because they only point forward)
than a std::list. It's more appropriate to use std::forward_list where
we don't need to push back (or the order the elements are in is
irrelevant), and we don't need to call size().