Simplify prepared updates file creation

Instead of reading back in the old prepared updates file and then
carefully appending any new updates, just write the new file from
scratch. It's easier to do so and makes sure we won't get stale entries
in the prepared update file.
hawkey: Correctly set the cleanup status

We were wrongly setting the cleanup status not on the removed package,
but on the one that got installed as a replacement.

https://bugs.freedesktop.org/show_bug.cgi?id=79791
zypp: Fix from hpj@suse.com - Don't prompt to install already installed packages.