Moved to document based indexes.

Also added __slots__ to Token and stored more information on each frame
for analysis purposes later. Frequencies are now document based.