Fix dpi detection in tight_bbox (fixes #2586).
backend_pgf: use the bounding box as clip rectangle (fixes #2586)