Implemented bufferevent_socket_connect_hostname_hints()

* Implemented bufferevent_socket_connect_hostname_hints so that ai_flags (such as AI_ADDRCONFIG) can be specified.
* Added a simple unit test
Nothing to do with your patch, but this has always bugged me. We do an unnecessary check to make sure it's not negative and is less than 65535.

```C
connect_hostname(..., ..., ..., ...., uint16_t port); /* sanity */
````