Make fbstring::assign() tight, and simplify operator=() and append()
Summary:
`fbstring::assign()` uses `append()`, which triggers exponential growth, but it's preferable that `assign()` behaves like the `fbstring(const char*, size_t)` constructor, which is tight.
Also rewrite `operator=()` in terms of `assign()`, to avoid duplicating the logic, and refactor the logic of `append()` for the aliasing case so that it uses the same expansion operation as the non-aliasing case.
Reviewed By: luciang
Differential Revision:
D3754932
fbshipit-source-id:
5423f2a360b4268b6a05dd0ae9d2fe5bd1eb855d