Add new pref maxCodeHints

For #9529.
I confirmed this is a performance boost for Code Hints.
You could just do: `this.maxResults = Math.min(maxResults || 1000, 1000);` and remove the next 3 lines of code.