Dynamics of unzipping and rezipping DNA