Due to a limitation of the getConstantStringInfo function the memchr and memrchr folders are unable to fold calls with zeroinitialzer constant arrays. These are rare as global top-level objects but likely more common as members of other aggregates, the handling of which has been proposed in D125114. In anticipation of that enhancement this patch removes the getConstantStringInfo limitation and enables two of its clients, the memchr and memrchr handlers, to fold calls with zeroinitialzer constants. It adds a TODO comment to enhance the third client (memccpy).
The getConstantStringInfo change replaces the TrimAtNull input argument with an in-out ZeroInit argument. This preserves the common default mode of trimming the string at the first null byte while at the same time providing a way for the remaining clients to work with zeroinitializer constants larger than a single byte.