Add target_endian crate cfg. Closes #4367
auto merge of #4977 : z0w0/rust/endianattr, r=catamorphism

```rust
#[cfg(target_endian = "little")]
fn something() { /* .. */ }

#[cfg(target_endian = "big")]
fn something() { /* .. */ }
```