Pods 2.5 optimizations work

This is a general PR for all the 2.x-optimizations work done so far by @jamesgol / @pglewis; to ensure we can see a full big picture of the changes. This will make it easier to review everything as it currently is (or becomes) and I can comment on the difference lines.
When doing null checks, I like to use if `( null !== $params->having )` format