BCToolBox: Add a replace function for std::string
Cherry-pick: !2655 (merged)
bctoolbox!150 (merged)
liblinphone!1896 (merged)