AMENDED AND RESTATED SECURED NOTE AGREEMENT among GENERAL MOTORS COMPANY, as the Initial Issuer, THE GUARANTORS and UAW RETIREE MEDICAL BENEFITS TRUST, as the Noteholder Dated as of August 14, 2009