Code cleanup: installer/installer

Cleans up useless uses of ```else``` and unnecessary indentation due to 'reverse-logic' in ```if```s.

For instance, instead of wrapping stuff in multiple 'positive' ```if``` checks, simply do 'negative' ```if```checks and return early.
This means you don't need to nest if statements.

The same can be done with for/foreach loops, but then do ```continue``` in 'negative' ```if``` checks.

Also removed ```else``` statements if the previous ```if```` block ends with a return, like:
```
if($something)
{
   doStuff();;

   return $this;
}
else
{
   doOtherStuff();

   return $that;
}
```
Can be replaced with:
```
if($something)
{
   doStuff();;

   return $this;
}

doOtherStuff();

return $that;
```

### Testing Instructions
This affects the JInstaller, so test the installer in Joomla.

### Just one file?
This is the first file I went through to improve a bit (can of course be improved even more with more effort). If this fares well, I'll do other files too.
Ironically, this breaks our code standard rules majorly (see https://github.com/joomla/joomla-cms/blob/staging/build/phpcs/Joomla/Sniffs/ControlStructures/InlineControlStructureSniff.php#L105-L111) so we'd have to relax the InlineControlStructureSniff to allow this.