Remove some mem::transmute calls and reduce some unsafe blocks in parallel.rs.