More tests and iterator refactoring

Refactoring is pretty safe due to unit tests coverage.
Add tests for segment + refactoring after test coverage
Improve iterator constructor

Since we know which fragment contains tail() or head() of segment
we can transfer this info into iterator constructor to avoid
fragment search algorithm call.
Implement segment::size() as a distance between begin() and end()

to eliminate two different implementation of size calculation.
Distance execution speed must be the same as eliminated size() code.
Add segment::empty() operation which is useful invariant