Returns the capacity of a memory structure.
size is guarded with (memory-p mem).
size returns the capacity of a memory, i.e., the number of elements that
the memory can hold. Addresses for mem are naturals in the range 0
through (size mem) - 1.
A memory's size is specified when it is created with new, and is fixed
throughout its lifetime. The implementation of size is private.