Reorganized checkapicommon for the model: it didn't need to be its own library
Added fcntl emulation, added more to fs_open, separated debugging types, noted some errnos to later add