Correctly handle invalid cookies

Fixes https://github.com/tornadoweb/tornado/issues/633
Is a new cookie parser a good idea in terms of maintainability?
Django https://github.com/django/django/blob/b8f2c972d0be8572727081c9c07ba18a3d446273/django/http/cookie.py#L23 and Trac http://trac.edgewall.org/ticket/2256#comment:8 seem to use the same hack (django's approach is better — it patches SimpleCookie only if it is really neccessary).