This is a fix for bug #3038 which was investigated by @BenJamesBen
who also proposed a fix in PR #3056
However, after discussing the matter, we agreed it would be better
to have a generic method in core to guard against the issue of
spurious drawing operations.
This commit adds the `Path.clean()` method that does exactly that,
as well as its documentation.
This moves resolving of the config from the pattern constructor to the
init() method. The idea is that adding a part to a pattern is exactly
the same as adding a part to a design. In other words, late-stage adding
of parts would be no different as the config gets resolved after that.
This is currently broken in many different ways, but the unit tests
particular to this new way of resolving the config do pass.