[WIP] Tensor tree expressions

old tensor module moved to `deprecated_tensor.py`

There are many `TODO` to be fixed, some tests still to fix.

There is some degree of performance regression, that's why I kept the previous code in a separate file.