Sort out the varheap copy method

This gets rid of the old varheap::set(), allowing parallelising the
copy where possible.