A championship golf course in St Andrews is set to come under new ownership.