Now removing stray old cookies from 5.0.12

Cookies from 5.0.12 seemed to have an extra slash in the path.
Firefox doesn't allow to remove them if the trailing slash isn't
there,
thus making it impossible to logout correctly.

This fix adds extra code to delete such stray cookies.

Ported from stable5 branch 99e5c6f7eb58404be2cc5448ec380f29c9a71225