Manually set document store length on set()

Repeatedly calling ``Object.keys(this.store).length`` is very expensive and dramatically slows the indexing process for larger data sets.

On my data set of around 15k items, this change reduces the index time from 23 seconds to 4.

Tests all still pass.

An alternative would be to make length a getter method which runs ``Object.keys(this.store).length``.

Thanks!