Move escape(string) -> FormatUtil.
1. Add template entities into lapg API and partly implement them.
2. Collect template parameters and resolve arguments in the TM compiler.