Remove types.h, move things from there into platform.h

Only need one header for such things, compiler specific includes,
type definitions, couple of helper macros.

Update definitions and bit wiggling in ata.c to match the updates
in platform.h.