Replace libc headers

This is almost ready.

Right now, ``test_istream`` fails and I have no idea why.

This incorporates some bugfixes to musl headers which have been submitted back upstream.