clearAllFromCookies undefined check

clearAllCookies was causes an error when $document.cookie is undefined.