Implement flexible target specification

See commit message.
This, as compared to most of the other built-in target specs, returns a complete Target and not a TargetOptions.