BZ1047469 - PHP cart: fixes pear package upgrade and downgrade messages

It checks the versions of currently installed and desired packages. It prints a helpful message about clean build if the user would like to downgrade a package.

For more information please check this bug: [Bug 1047469](https://bugzilla.redhat.com/show_bug.cgi?id=1047469)

@vvitek : could you review this please? Please also look for bash and project specific conventions.