add automatic tf buffer cleaning on bag loop for python

This logic was already implemented for c++
but not for the python module.
Merge pull request #38 from v4hn/python-tf-loop-clean-buffers-hydro

add automatic tf buffer cleaning on bag loop for python