High-swing buffer for programmable resistive memories