memset_s based on capacity rather than size

* Capacity gets set to 0 when the managed pointer is null,
  preventing an arithmetic overflow in the size calculation for memset
  due to elems_size_ being uninitialized.
* Ensures zeroing of trailing elements when `erase()` or a similar
  function has been called which reduces elems_size_.

Bug: 129300035
Change-Id: If2e6c1e10ea42c53a450e3da569c64c54df0dcbe
1 file changed