factor common char encoding into main Target; version set to 4.4

The default implementation returns `Integer.MAX_VALUE`. The `JavaTarget` is the special case with a lower value because the JVM places unexpected bounds on the size of a literal string in the compiled bytecode. Most other targets shouldn't need to override this method.