Add the TARGET_DEFINED generator expression

This tests whether the parameter is a usable target.
Merge topic 'TARGET_DEFINED-genex' into next

2bee6f5 Add the TARGET_DEFINED generator expression