Reworked all code...

- Reworked all code: pep8 compliance, added proper docstrings
- Added special treatment for values outside knots range for 'cr/cs'
- Reworked 'te' api to have full control on constraints
application/derivation
- Added basic tests, to be completed with full scale R comparisons