Second Amended and Restated INVESTOR AND REGISTRATION RIGHTS AGREEMENT