Add a safer version of transmute for references

Add the two function core::mem::transmute_ref and core::mem::transmute_ref_mut.

If transmute is needed, it is commonly used to cast references. I argue that it is in most cases undesired to change the lifetime of the reference during this cast. The added functions preserve these annotations and are thus safer to use for references.