libopkg: run prerm scripts for the old version also on upgrade