Tuple compiler: change (char *) to (const char *) where appropriate.
Replace global, mutexed tuple formatter state with a TupleFormatter object.