Add try-catch block around cookie name decoding

Stops differently encoded cookies from causing trouble (they won't work with `$.cookie` but they won't break all other cookies as well). Partially fixes #294.