Added an upper bounds check for a List<int>

The `DIFFs FROM 2.9.4.txt` file indicates that the Java collections return
null when the index is out of bounds. I imagine that this bug was simply copied
from generally correct Java code and now is just simply not correct anymore.
Please stop me if this is actually an indication of a deeper problem, like
corruption of the index.

In the problem that I was observing, fieldNumber = 110 and byNumber.Count = 10,
Since the list index was 11x the size of the list, it feels like it indicates
data corruption in the index. I'm using MongoDB.Lucene's MongoFSDirectory, so
I'm concerned that could be at fault.

fixes LUCENENET-520