Adjust shadow offset to the line width and scale

When the object line width is set to 0 and lines of 1 physical pixel are
drawn, the shadow offset is now adjusted to the scale to avoid a gap
between the line and its shadow.

For line width between 0 and 1 pixels, the shadow offset is now also
smaller to avoid the gap.

Based on feedback at issue #502.