Add `occ upgrade` command.
Move all upgrade routines into the command-line tool.
Use the OutputInterface for output and return error codes.
Use writeln() instead of write()
Missed one write()->writeln(). Fixed.
Use "else if" to remove one level of indentation.
Add some color to the occ upgrade output.
Merge pull request #5531 from owncloud/upgrade-form-occ

Add `occ upgrade` command.

* owncloud/upgrade-form-occ:
  Add some color to the occ upgrade output.
  Use "else if" to remove one level of indentation.
  Missed one write()->writeln(). Fixed.
  Use writeln() instead of write()
  Use the OutputInterface for output and return error codes.
  Move all upgrade routines into the command-line tool.
  Add `occ upgrade` command.