src: templatize the Buffer::*Slice functions