Define AR to help with lua cross-compilation

Closes #997
Use resolv library in Solaris

For some Solaris flavours, the inet_aton in in resolv library.
Not linking this library will introduce link error.

Improves compatability with older Solaris and still
works on new Solaris.

Closes #1092
Remove duplicate prototypes in redis.h

Also moves acceptHandler() to be near the other accept...() functions.

Closes #1105
va_copy must be matched by va_end

Hat tip to @rfuchs. See: https://github.com/redis/hiredis/pull/178.

Fixes #1187