Add support for some getsockopt/setsockopt options.

Support and add API for getting/setting SO_RCVTIMEO, SO_KEEPALIVE.