cd.h: expose some more functions
bios.h: refactor and add some more functions

The character soup gave me a headache when I tried to add these
functions.
Documentation included, haven't seen if Doxygen will deal with macros
properly.
increase .gitignore

Lots of CMake generated files.