Controversial tree planting targets for farms in Wales have been scrapped.