net: family option in net.connect

`dns.lookup` defaults to selecting IPv4 record even if IPv6 is available
for the desired zone. Generally, this approach works, but if IPv4
address is unavailable - there'll be no other way to opt-out and connect using
IPv6 address than calling `dns.lookup` and passing it to `.connect()`
directly.

This commit adds `family` option to `net.connect` method to figure out
this issue.
util: isObject should always return boolean

Fix small bug where isObject would return the original object instead of
true.
smalloc: expose ExternalArraySize

Useful to correctly determine the byte size of the external memory that
needs to be allocated for an external array.
smalloc: length is byte size, not array length

The C++ API has been changed so the passed length is the byte size of
the data, not the length of the array.

This was done so users need to explicitly define how much memory they
want allocated.
smalloc: consistent-ify syntax

Small syntax fixes of variable renaming and argument alignment.