fix TimeClient crash on page refresh

When a client refreshes the page, the websocket is reconnected and the
old one becomes stale. The next time notification causes the server to
write to an invalid pipe, resulting in Errno::EPIPE. That exception is
caught now, letting the client terminate gently.