[WIP/RFC] Add unit tests for buffer.c and fileio.c

I don't think it's a good idea to copy them like this.  For one, as @aktau said, it's confusing.  Also, I'd rather simply add the include directory to the location that requires them--copying just wastes time in this case.

I haven't looked over this whole PR, but how is that this works correctly?  IIRC, the whole pre-processing bit was to grab some constants out of a header that we're only available as `#define`s.  If you don't need such tactics, why do the other headers still need it?