core: Provide functions for different byte orders

Rationale: see #1586.

In the network stack those are always above the type

```
typedef union __attribute__((packed)) {
    …
} …;
```

I get that this might be better to not confuse coding-style tools (I'm looking at you astyle ಠ_ಠ), but can we discuss this please? I think a uniform code is always better.