Pass primitives by value

Pass the following by value:

* enums
* bool
* i8
* i16
* i32
* i64
* f64

and `optional<T>` for all T of above
This is the bulk of the change.  The rest is cruft.