[NRV] Use typeclass for message parameter extraction.

Instead of defining a custom method for each type, use typeclass to extract the value of type T from a MValue. Default extraction implementation are provided but can be changed by passing a different Extractor[T].

Also, renamed List operation to Index to avoid annoying name clash with scala immutable List.