add fopencookie

See https://issues.dlang.org/show_bug.cgi?id=13755
I wanted to have this review first so I can see whether I did major things wrong. 

Also, I can add fmemopen, open_memstream and open_wmemstream, but I think that with fopencookie available, all of these are trivial to implement in D.

Can't hurt to add them anyway, I guess. 

Is using:

FILE *fmemopen(void *buf, size_t size, const char *mode);
       FILE *open_memstream(char **ptr, size_t *sizeloc);
       FILE *open_wmemstream(wchar_t **ptr, size_t *sizeloc);

enough or do I have to D-ify them? (do I use "in char* mode" for "const char* mode" ?)