Add upgrade functionality

Record installed packages in PostgreSQL share dir.  Reject installation
of packages already installed.  Add "upgrade" and "list" commands.