Fix dpi detection in tight_bbox (fixes #2586).
backend_pgf: use the bounding box as clip rectangle (fixes #2586)
Merge pull request #2621 from pwuertz/fix_2586

Simplify and fix dpi handling in tight_bbox