REGISTRATION RIGHTS AGREEMENT Dated as of July 1, 1997 by and between CALPINE CORPORATION