The Goldman Sachs Group, Inc. Medium-Term Notes, Series D Amended and Restated Distribution Agreement