Optimize selector building

`+stringWithFormat:` is expensive when it's hit repeatedly. This builds up C strings instead, preferring stack allocations whenever possible.