Changed some functions that don't modify their arg to take const arg.

It avoids caller having to strdup to create (char*) from (const char*).

Some new lognorm work builds on top of this. Without this a lot of unnecessary string-copying would be required.