Implement the ability (for the S/G case only for now as that is what
was needed for iwlwifi(4)) to write device driver core files, usually
dumping firmware state.
This is modelled after our core(5) code currently and has a hardcoded
directory prefix (/var/crash) and some other omissions.
See comment in the file for what we likely should do.
Any suggestions for improvements are welcome, especially if we really
can get rid of all this "magic" for opening a file from within the kernel.