SERVER-12132 Stop using stringstream in Value::coerceToString()

This speeds up the function by two changes:
1) Using StringBuilder (through str::stream) rather than stringstream.
2) Not constructing a StringBuilder or stringstream when not needed.

At least with libstdc++, constructing and destructing a stringstream is
extremely expensive.