Allow to programmatically install specific major version
Allow to programmatically install specific major version

Add options to select a 'channel' to install a specific major version.
Closes https://github.com/composer/getcomposer.org/issues/155.

To programmatically install 1.* by default, allowing to set COMPOSER_MAJOR_VERSION=2:
```bash

EXPECTED_CHECKSUM="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"

if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
then
    >&2 echo 'ERROR: Invalid installer checksum'
    rm composer-setup.php
    exit 1
fi

php composer-setup.php --quiet --${COMPOSER_MAJOR_VERSION:-1}
RESULT=$?
rm composer-setup.php
exit $RESULT
```

Calling `php composer-setup.php --2` and then calling `./composer.phar self-update` results in the stable version being installed.

A PR for the docs to show the usage in 'How do I install Composer programmatically?' will be created in [the composer documentation](https://github.com/composer/composer/tree/83c64a9d191b64689b408906d40943958a6a8eb0/doc).

composer/getcomposer.org,composer/getcomposer.org,composer/getcomposer.org,johnstevenson/getcomposer.org,johnstevenson/getcomposer.org,johnstevenson/getcomposer.org