Foster to plan £40m racecourse