Draft implementation of the AgnInferParentStream class

The implementation is complete, tested, and leak-free.
The unit test needs to be completed, but manual checking has looked good so far.