liberate heavy dependency on Buffer shim

This module entrained the hefty Buffer shim, but we just need the ability to measure UTF-8 in bytes, which is easy enough to do with a function that takes advantage of the browser’s native but cleverly-hidden UTF-8 encoder.

I’m providing this patch on behalf of its original author, @pierrefrisch.