GetNumAnims() is only used in two places to do existence checking. We
can just provide a dedicated function for this and also have size
querying as well.
Given the rest of the interface now uses size_t, we can convert this
over. While we're at it, we can also take the result of the at() call
inside of it in order to avoid any copies of data altogether.
Same behavior, but plays nicer with containers.
This can technically result in less zero-extensions with regards to
memory indexing and registers, but this wasn't the underlying reason for the change.
A cache is typically a use case for mutable (as the outside user of the
class wouldn't directly rely on the cache as part of the API, this would
only function to assist the API perform better), so we can mark the
selection cache as mutable and make the code nicer to read overall.