WIP: add af_unix socket support

This is a first attempt at adding af_unix local socket support. There are no tests yet. Really I'd just like some feedback (code review!) on the approach and whether or not you'd be happy to accept this feature when it's ready.

(Sorry about the aggressive trailing whitespace removal!)