MFC r264146:
Fix a race between kqueue_register() and kqueue_scan() setting KN_INFLUX
flag while knlist is not locked, which caused lost notifications from
parallel knote().
MFC r264173:
Use realloc(9) instead of doing the reallocation inline.