Add user impersonation (again)

Instead of modifying the cli this modification just read the user impersonation first the realuser parameter from the configuration file then read the NIPAP_REAL_USER environment variable.

If at least one of those is set, the value will appear in the authenticated_as column from the ip_net_log table in the database. If both are set, the value from the environment variable takes precedence.