Simplify bufferspec implementation

Move more of the work to the OCaml side; gather the C calls together.