Native fixes

A couple of native-internal fixes:
- some race conditions
- resolved packet delivery delay
- clean up system call guarding
- clean up headers
- hwtimer pre-initialization