Move paircopy() and friends to use talloc()