GI Dynamics, Inc. Note and Warrant Purchase Agreement