reimplement mp_ring_read() in terms of mp_ring_read_cb()

these two functions were nearly identical, so here's a way of factoring out some of the duplication.
submitted separately from the mp_ring_read_cb() fix in case you'd prefer just to merge that one.