[5.0] Clean Up Cookie Queue Middleware

- Unused namespace import
- One-line control statement without braces