Execution of the nit code on another thread, and redefinition of basic input and output methods

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>
Updated the example for pnacl, to make it work with the threading update

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>
Suppression of the '-Werror' flag to avoid failing compilations and threading usage for complation

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>
Deleted useless 'while' and inlined write method

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>
Edited 'exit' function for pnacl in order to avoid crashes.

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>
Updated the example, to show how to handle an 'exit' message in JS.

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>