Add String::capacity() method, use it instead of get()->capacity()

Summary: This makes String incrementally more compatible with std::string
and exposes one less StringData api.

Reviewed By: @mxw

Differential Revision: D1684895