[ADT] Adding bidirectional iterator functionality + unit tests (#160726)
This feature is needed for #160415 , kuhar suggested that I split that
PR into 2 so that the ADT work is checking in first.
---------
Co-authored-by: Jakub Kuderski <kubakuderski@gmail.com>