Fixed join with rete sub-networks

- Fixed join nodes when using sub-networks
- Fixed tuple cleanup
- Added tests for Not nodes