Implement fmemopen in terms of funopen where needed and possible.

Currently done only on NetBSD 5, but this should work for other BSDs
and probably Android as well, instead of the libc-internal hacks that
tlsdate currently uses for fmemopen on Android.
Merge pull request #95 from riastradh/implement-fmemopen-with-funopen

Implement fmemopen in terms of funopen where needed and possible.