Create RefType enum.
Moves all functions that previously used usize to this type. Instead of direct conversions to a slot number, use a to_index fn. This also changes the size of the global mv state and context ref counting arrays as they don't need LAST_FRAME.
Showing with 157 additions and 110 deletions