Fix NRE in CookieStore constructor.
Fixed NRE found in TestAllLeafRevisionsArePushed.
Fix for invalid cast found in TestChangeNotification.
Updates TestDeleteDocument to match new behavior.