Re-worked SparseBitVector's most-recently-used-word caching (CurrElementIter)
such that SparseBitVector::test() can be made const. This came up when
attempting to test individual bits in a SparseBitVector which was a member of a
const object.
The cached iterator has no bearing on the externally visible state, it's merely
a performance optimization. Therefore it has been made mutable and
FindLowerBound() has been split into a const and non-const function
(FindLowerBound/FindLowerBoundConst) for the const/non-const
interfaces.
Technically, const qualifier is a part of the member function signature, so no need for a different name. If called from another const function, like test, the const version of this function will be called regardless of the object itself being const or not.
But honestly, I like making the difference explicit in this specific case, it draws attention, and it's probably a good thing as FindLowerBoundImpl needs to be used or modified with care so we don't accidentally leak a non-const iterator from a const object in the future.
In the end, I'm fine with both, a different name and the same.