Clean up some code around setting the agent

Some small cleanup around setting and getting the http/https agent. Looks like maxSockets weren't getting properly set when outside of init, so I moved that logic into `getAgent()`, which has been renamed to `_chooseAgent()` since it doesn't literally get the current agent, as the name suggests. (Underscore added since it looks like it should only be called privately) (happy to bikeshed on a name, I'm not particularly tied to `_chooseAgent` and I'm sure there are better names out there)

@mikeal I'd want your sign off on this since it's touching some older code
looks like this was an older setting we haven't supported in a while