Add triangle/nonzero functions

- Adds Tri op and related tensor.tri, tensor.triu, tensor.tril functions (with the same uses as their numpy analogues.)
- Adds Nonzero op and related tensor.nonzero function and nonzero method for Tensor instances.
- Unit tests