Add new pref maxCodeHints

For #9529.
I confirmed this is a performance boost for Code Hints.
It seems odd to me that the pref defaults to 50 but the API defaults to 1000.  Any reason for the difference?

We could still cap the arg at 1000 but have it default to 50 if unspecified -- the 2nd of my code suggestions above would leave the code still pretty easily understandable if we did that.