Test libs

Improve libs so that all tests on them pass.

Currently, ./testfull.sh does test only a subset of the files in lib/.
With this PR all files in lib are considered.

Changes are:

* some lib files are fixed to allow an independent build for each engine. 
* targetless-mnit and linux-mnit automatically exit in a testing environment 
* platforms tests are silent, so that niti and sav are easier to manage.