Fix upgrade detection in %posttrans scriptlet (rhbz#2115094)
4047e4fb7bb76f2578989e98de276e9ceb4e94b9 got things very wrong.
The trick with "[ $1 -eq 1 ]" doesn't work for transaction triggers
because the argument is not provided by rpm. We need to use a state
file to propagate the information from %post to %posttrans.