Add helper functions for 8255 port read and write

Which reconfigure the relevant port direction in the control word
on the fly as needed.

Move all the internal ATA defined constants etc out of the header,
will just keep public API stuff in ata.h.

Still doesn't work, but I know of a few problems to fix yet.