Add semihosting support

The code added with this commit should make it possible for small
ARMv6-M assembly language stubs to be written for the purpose of
marshalling newlib file i/o over to GDB.  I did need to refactor the
MRI semihosting and file i/o code a bit to make this easier since
pinkysim runs the debugger stub code outside of the actual ARMv6-M
core being simulated.  This meant that it was better to have the
lengths of filename strings calculated on the target and communicated
to the MRI core instead of running strlen() in the MRI code base. It
also meant that there should be a way to communicate the global errno
back to the target as well.