Fix issue with updating basket cookie in the middleware

Handle the case correctly where the basket cookie needs to be deleted
and updated in the same request. This can happen when unfreezing the 
basket. Django's response.delete_cookie doesn't remove the cookie from
request.COOKIES so we need to manually check this.