OPENJPA-2376: Escape character in JPQL with parameter substitution generates incorrect SQL - committed a patch sent to me by Albert Lee - merged changes from 2.1.x.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1513276 13f79535-47bb-0310-9956-ffa450edef68