Add unit tests for PharPackageTask.

Test openssl signatures in PharPackageTask.
Make the unit tests pass.

setSignatureAlgorithm() must be called last. If files are added to the phar
package after it has been called, Phar will try to recompute the signature,
but will fail because it does not remember the private key correctly.

Also, setSignatureAlgorithm()'s second argument does not accept OpenSSL
resources. The private key must be passed in its text form, which is obtained
by calling openssl_pkey_export().
Upgrade phar to latest available version on PHP 5.2.
Merge pull request #238 from fpoirotte/pharpkgtests

Make OpenSSL signatures really work in PharPackageTask.