Implement flexible target specification

See commit message.
I'd prefer to have something like `Target` and `TargetBase` or `Target` and `TargetConfiguration` where some type requires these arguments to be constructed so we don't have to perform validation.