Use right date limit; iterate txn backwards.

Going backwards prevents us from messing the iterator due to
the deletion.
Pass line number to importer scriptlets.
Handle backwards txn refs, improve docs.