Add ‘retryUntilItsDone’ utility function
Fix callback management when exception occurs

- fix TcpConnection error-event management

- add try/catch error management in Type function

- fix integration test
Add test for ‘retryUntilItsDone’ function
Improve ‘crypto.createSHA1Hash’ function