core: add {Imm,M}utablePrimitiveSlice trait

Lets eligible slices be converted to a slice of bytes. Abstracts out some
sensible unsafe behavior from `rust-image`.
This is also exposing the underlying endian-ness of the system (not portable), which may want to at least be mentioned in the documentation if we move forward with this.