Remove some mem::transmute calls and reduce some unsafe blocks in parallel.rs.
Merge pull request #2778 from Ms2ger/parallel

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