Code cleanup: installer/installer

Cleans up useless uses of ```else``` and unnecessary indentation due to 'reverse-logic' in ```if```s.

So this improves readability of code by trying to eliminate the use of ```else``` statements and keeping the indentation to the bare minimum.

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.

### Credits
The improvements are based on a few rules from PHP Object Callisthenics. Kudos to @rdohms for inspiring the PHP and Joomla developers with that!