Refactor "ctx" param to last arg in shape.buffer()

This is more consistent with other methods that take a context.