sql: Use joinAndExprs in simplifyAndExpr and abstract joinOrExprs
sql: Use joinAndExprs in simplifyAndExpr and abstract joinOrExprs

We pulled joining individual expressions into `AndExpr` nodes into the
helper function `joinAndExprs` but we missed using it in
`simplifyAndExpr`. This change fixes the duplicated code there, and also
introduces a `joinOrExprs` helper that shares code with the
`joinAndExprs` helper.

veteranlu/cockroach,vaibhavarora/cockroach,maxlang/cockroach,nieyy/cockroach,arjun4084346/cockroach,cockroachdb/cockroach,vaibhavarora/cockroach,arjun4084346/cockroach,vivekmenezes/cockroach,paperstreet/cockroach,arjun4084346/cockroach,bg451/cockroach,cuongdo/cockroach,glycerine/cockroach,bg451/cockroach,veteranlu/cockroach,sunya123/cockroach,paperstreet/cockroach,vivekmenezes/cockroach,sunya123/cockroach,vaibhavarora/cockroach,glycerine/cockroach,maxlang/cockroach,glycerine/cockroach,cuongdo/cockroach,petermattis/cockroach,sunya123/cockroach,cockroachdb/cockroach,nieyy/cockroach,vivekmenezes/cockroach,veteranlu/cockroach,petermattis/cockroach,sunya123/cockroach,cuongdo/cockroach,arjun4084346/cockroach,petermattis/cockroach,glycerine/cockroach,veteranlu/cockroach,vivekmenezes/cockroach,vivekmenezes/cockroach,cockroachdb/cockroach,nieyy/cockroach,bg451/cockroach,petermattis/cockroach,maxlang/cockroach,maxlang/cockroach,bg451/cockroach,veteranlu/cockroach,cuongdo/cockroach,glycerine/cockroach,nieyy/cockroach,paperstreet/cockroach,petermattis/cockroach,glycerine/cockroach,cockroachdb/cockroach,maxlang/cockroach,vivekmenezes/cockroach,vivekmenezes/cockroach,nieyy/cockroach,maxlang/cockroach,petermattis/cockroach,cockroachdb/cockroach,cockroachdb/cockroach,paperstreet/cockroach,sunya123/cockroach,maxlang/cockroach,paperstreet/cockroach,bg451/cockroach,bg451/cockroach,paperstreet/cockroach,arjun4084346/cockroach,glycerine/cockroach,cuongdo/cockroach,paperstreet/cockroach,veteranlu/cockroach,glycerine/cockroach,nieyy/cockroach,sunya123/cockroach,cuongdo/cockroach,veteranlu/cockroach,sunya123/cockroach,nieyy/cockroach,nieyy/cockroach,cuongdo/cockroach,vaibhavarora/cockroach,arjun4084346/cockroach,vaibhavarora/cockroach,sunya123/cockroach,vaibhavarora/cockroach,arjun4084346/cockroach,maxlang/cockroach,petermattis/cockroach,vivekmenezes/cockroach,cuongdo/cockroach,arjun4084346/cockroach,petermattis/cockroach,bg451/cockroach,cockroachdb/cockroach,veteranlu/cockroach,paperstreet/cockroach,vaibhavarora/cockroach,cockroachdb/cockroach,vaibhavarora/cockroach