Lucene 5293 Also use EliasFanoDocIdSet in CachingWrapperFilter

This contains the LUCENE-5293 patch of 22 Oct 2013 with minor javadoc improvements.
I want to revive this because I'd like to allow encoding an Elias-Fano sequence also on a byte[] at another issue (currently long[]'s are used).

Thanks for the recent git discussion on java-dev, I should have started using git earlier.
This is my first pull request,  I hope I got it more or less right.

This contains an EliasFanoDocIdSet that can be constructed with only an upperBound, and that will chose an Elias-Fano encoding or a FixedBitSet when that is better.
This EliasFanoDocIdSet is used to cache in CachingWrapperFilter when the given set is not cacheable.

This also adds a method numDocIds to DocIdSet in order to try and be as efficient as possible when creating the EliasFanoDocIdSet. This method can be implemented when the number of doc ids is easily available, and an implementation is added for various filters, a.o. TermFilter.

There are also some minor improvements in EliasFanoEncoder/Decoder, an occasional rename, and some changes to allow freezing, i.e. to allow resizing the currently used long[] arrays that encode that sequence.