Implement ``freeze`` context manager for freezing the time.