New York lawmakers and the governor have agreed on a package of measures to give racetracks millions of dollars in tax breaks, steer funding to a new advanced equine imaging research program, and end an antiquated payout system for horseplayers.