Fixes occasional segfault in lws_chage_pollfd

* so it happens that sometimes lws_change_pollfd is called with
  bad or incomplete data structures, mainly the context pointer
  obtained from wsi->protocol is null or wsi->position_in_fds_table
  is -1; checks have been added to avoid this condition