fixes #2151 - use DN environment variable instead of CN

nginx is unable to pass bits of the X.509 subject, only the entire DN, so
support that as a lowest common denominator.

---

I was going to change the rDNS scheme as well, but decided that I'll mention it in my e-mail to foreman-users to get feedback (will send as soon as the installer PR's merged).