Refactor app table printing
Refactor app table printing

Remove duplicate code for outputting tables of apps and identification
of an app's state.

buo/brew-cask-upgrade,buo/homebrew-cask-upgrade,buo/homebrew-cask-upgrade,buo/brew-cask-upgrade