naively implement nqp::replace

the implementation is probably not optimal and i'm not
100% sure if there's no need for temporary roots, but
it's a start and works at least in part.