[CODEC-174] 15% performance gain with this patch from https://issues.apache.org/jira/secure/attachment/12613371/CODEC-174-refactor-restrictTo-method-in-SomeLanguages.patch. See test Javadoc.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1541239 13f79535-47bb-0310-9956-ffa450edef68