Fix endptr checks in ConfigValue.h

The function remove_non_number() was called twice, which will return
two different string instances. Then pointers to the separate instances
were compared to each other. If everything goes well, they will be allocated
at same point in memory and everything works, but there is no guarantee..

Fixed by adding a temporary variable.
Merge pull request #341 from PetteriAimonen/edge

Fix endptr checks in ConfigValue.h