fix a bug in TermDocumentIterator::doc_item().
fix a bug in TermDocumentIterator::doc_item().

as in TermDocumentIterator::accept(), it might assign pTermDocReader_ as BitMapIterator*,
while doc_item() converts pTermDocReader_ to TermPositions* using (TermPositions*),
this conversion might leads to invalid pointer.

now it is fixed using dynamic_cast and check the conversion result.

izenecloud/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-lite,pombredanne/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-ad-delivery