Add new pref maxCodeHints

For #9529.
I confirmed this is a performance boost for Code Hints.
I find the dense logic here a little hard to follow.  It seems more clear if we did something like:

```
this.maxResults = ValidationUtils.isIntegerInRange(maxResults, 1, 1000) ? maxResults : 1000;
```

or

```
if (ValidationUtils.isInteger(maxResults) && maxResults > 0) {
    this.maxResults = Math.min(maxResults, 1000);
} else {
    this.maxResults = 1000;
}
```