The application_name to be used when connecting to a database can now be specified as a command line argument (--application-name) or be taken directly from environment variables (PGAPPNAME). It still defaults to 'pgcli' when not specified. Closes #1421.
e2ff38d