add arraybuffer utilities

The need for these functions comes up again and again...these are from socks-rtc. Am hoping I've gotten the conventions right, e.g. arraybuffers.d.ts.