Merge "Add trimToSize() to public API." into jb-mr1-dev