fix type mess by using stdint.h types

there was a plethora of uint, uchar, ushort etc macros used,
which caused build issues in a number of cases, for example when
compiling against musl libc.
these macros are causing breakage, if they are defined before including a system 
header

imagine
```#define uchar unsigned char```
and later ```#include sys/types.h```
which does
```typedef unsigned char uchar;```

when the preprocessor expands the uchar macro here, we end up with
```typedef unsigned char unsigned char;```

which causes an error.
thus i removed all these macros and replaced them with generic types from stdint.h or just their raw C equivalent (in this case unsigned char)