migration: convert savevm to use QIOChannel for writing to files