[core] ConditionalGetMiddleware should import `parse_http_date_safe`

Fix 500 error on some etag cache cases
Fix creating a new query in DB Query