Move SocketEngine::IgnoreError() code into socketengine.h and add test for EWOULDBLOCK