Add new pref maxCodeHints

For #9529.
I confirmed this is a performance boost for Code Hints.
Yeah, seems reasonable - feel free to open a PR.
But you should first check `maxResults > 0`.