mds: use vector to manage Contexts rather than a list
Pull request ID:
This is all about the usual benefits of converting a list to a vector without any of the potential drawbacks:
- We don't need a memory allocation for each Context * with all accompanying overhead.
- Access is contiguous and cache-friendly.
- Clearing a vector is a single free internally; no destructors need be called.
Splicing is theoretically more expensive but due to the cache friendliness of vectors, this is likely to be negligible.