Split large strings in templates

The templates compiler should not output strings larger than 65536 bytes long, because the Java Language Spec disallows string literals that long.

Note that that's 65536 bytes, not chars, and strings are stored in class files using UTF-8.  Also note that this is probably one of the cases where we need to be really careful about surrogates, using `grouped` for example could end up splitting a UTF-16 surrogate pair, and who knows what sort of issues that might cause, especially seeing as the JVM does a UTF-8 -> UTF-16 conversion when it reads class files - it's likely to throw an error at classloading time.