make linenoiseEdit read resilient to signal

Read in a loop and allow retry if read was interrupted by a signal.

Rationale : 
I use linenoise in a piece of code that uses posix timers (bound to realtime signal). Every time the timer fires,
read returns -1 and errno is set to EINTR. This causes linenoise to think that an empty line was read, and this closes my interactive session.
This patch prevents this from happening : a signal just causes read to retry.