If a recv fails, close that socket instead of exiting
More socket cleanup fixes, plus improved handling of page claims.