dos: add directory-relative file functions
This adds extended versions of all DOS functions that take a filename and interpret a relative name against the current working directory to take a directory lock and a filename, and then interpret a relative name against the given lock.
This lets an application avoid race conditions when operating on files outside the current working directory. The application has to assemble path strings to do this, and there's a possibility that one of the intermediate path components could be a link, and another process could retarget it.
This is analogous to the POSIX *at collection of functions (eg openat, linkat, etc). And indeed, that's part of why I want these: so I can cleanly implement the POSIX wrappers without out having to resort to (complex) path mangling (see https://github.com/robn/AROS/commits/posixc-openat for a work-in-progress implementation of openat on top of this).
Open considerations:
- naming.
*Relativeis a lot to type, but accurate.*Atmight be better. I don't particularly care; strong opinions welcome. - ABI. I've done the dumbest thing possible and just added LVOs, but I'm aware that these might clash with AmigaOS/MorphOS in the future. @Kalamatee suggested the technique of making an alternative interface via secondary base, but I can't quite see the setup in my head yet. Guidance welcome!