Neural Optimal Transport with General Cost Functionals