Common Table Expression and prefetch
This is probably a duplicate of #1809, but I'll leave it open for @coleifer to judge. Thanks for reporting. Ive taken the description from this issue and added it as a comment to #1809. I'll deal with this as a single issue.
Consider the following example (note that this is obviously a silly example, but just enough to show the problem):
```
from peewee import *
db = PostgresqlDatabase('scoreboard')

class Base(Model):
    class Meta:
        database = db

class Challenge(Base):
    pass

class Attachment(Base):
    challenge = ForeignKeyField(Challenge, backref='attachments')

cte = (
    Challenge
    .select(fn.MAX(Challenge.id).alias('max_id'))
    .cte('demo')
)

q = (
    Challenge
    .select(Challenge)
    .join(cte, on=(Challenge.id == cte.c.min_id))
    .with_cte(cte)
)
p = Attachment.select()
r = prefetch(q, p)
print(list(r))
```

The generated SQL for the prefetch of Attachment will be:
```
SELECT "t1"."id", "t1"."challenge_id" FROM "attachment" AS "t1"
WHERE (
    "t1"."challenge_id" IN
    WITH "demo" AS ((SELECT MAX("t2"."id") AS "min_id" FROM "challenge" AS "t2"))
    (SELECT "t3"."id" FROM "challenge" AS "t3" INNER JOIN "demo" ON ("t3"."id" = "demo"."min_id"))
)
```

While the CTE queries and the subquery themselves do get extra parentheses, the base query is not parenthesized leaving the `WITH` part bare and resulting in an invalid syntax.

The expected query would be:
```
SELECT "t1"."id", "t1"."challenge_id" FROM "attachment" AS "t1"
WHERE (
    "t1"."challenge_id" IN (
        WITH "demo" AS (SELECT MAX("t2"."id") AS "min_id" FROM "challenge" AS "t2")
        SELECT "t3"."id" FROM "challenge" AS "t3" INNER JOIN "demo" ON ("t3"."id" = "demo"."min_id"))
    )
)
```
