Pass primitive types by value

* enum
* bool
* i8
* i16
* i32
* i64
* f64
and optional<T> for all T of above