add 2-way Stat.Type <--> int mode convenience methods

mode --> Type code was already there (static method extractType()). 
i've added the other direction (Type --> mode) and packed both methods into the Type enum itself