Installer now generates a good project name for composer.json

This fixes #78 and it's completely based on the [code used by Composer](https://github.com/composer/composer/blob/4a3bc58adfd501fa6e82c82fdd9e8d4036898fa1/src/Composer/Command/InitCommand.php#L172-186) and reported by @stof.

In addition to the generation of the project name, this PR reorders and adds missing docs for some methods.
I understand your reasons, but this makes diffs harder to read (for example, see the changes below related to `generateRandomSecret()`).