Improved examples on Vec documentation

- shrink_to_fit example is now more clear by asserting the capacity value
- annotation [0, mid) changed for [0, mid]