WAYNE — The township has agreed to buy the YMCA property on Pike Drive for $12.2 million, clearing the way for health and recreation officials to grow their programs and protect the land from future redevelopment.The historic acquisition, the largest that the township has made since voters approved the creation of an open space fund…