Make sure notice can be dismissed even if setting cookie throws

When localStorage is full, setting a cookie can throw
NS_ERROR_DOM_QUOTA_REACHED. In that case at least hide the notice in
response to the user clicking "dismiss" (even if we're unable to save it).

Bug: 64716
Change-Id: Ice9a1589bb3a5f664fdf2e72ae4e8897067f993e