Grow array buffer in ScriptDocValues if needed

The buffer in ScriptDocValues for Strings was never called causeing
NPE in scripts if a document has > 10 distinct values in a field.

Closes #3051