Consistent Multitask Learning with Nonlinear Output Relations