Add helpers to CollectionUtils for building HashSets and LinkedHashSets that can hold an expected number of elements without needing to resize / rehash.

I also went ahead and updated places throughout the code base that appeared to be potentially sizing HashSet / LinkedHashSet incorrectly. This is by no means exhaustive.

See ff11467a0c6, where this was added for HashMap / LinkedHashMap.

Comment From: kilink

I also wanted to note that part of the reason for this PR is that I'd like to be able to rely on this helper in Spring projects that can't use the JDK19 helpers, and where we don't necessarily want to rely on Guava.

Comment From: sbrannen

This has been merged into main in e1a32d4ba9cb88931a34172927a396fae2043133, revised in b9c304b8905e6a0112dd888418e5fa56a0fe0c6e, and extended in 644887e09447e464d580e8bef3c8fa3cff20c5bf.

Thanks