(packaging) (#20148) Update logrotate script when appropriate

Logrotate versions > 3.8 complain about permissions unless the su directive
is explicitly set.

This PR updates the RPM and Debian package to set the su directive properly on
dists that need it (Debian >= 7, Ubuntu >= 13.04, EL >= 7, SLES >= 12, Fedora >= 16)

The second commit is a minor refactor of the Debian rules file to improve the use of
templates to reduce redundant code and improve consistency.