STOCK PURCHASE AGREEMENT BETWEEN GAINSCO, INC. MGA INSURANCE COMPANY, INC. AND MONTPELIER RE U.S. HOLDINGS LTD. Dated as of August 13, 2007