CookieManager as factory

CookieManager created as factory and remove all references to AngularJS cookies.