Added homegrown lexical_cast, but still fails unit test.

We are having problems preserving precison past 4 decimal places,
and determining if the value is a valid int or string. Frankly,
I'm not sure how I was doing that in the past, so some research is
called for.