Implement String::ToDouble().

Fixes #3544.
Use String::ToString() in CompatComponent::ProcessCommand().