Add p_strnlen wrapper and mingw implementation

Apparently MinGW can't be bothered to support POSIX `strnlen` so this adds a `p_strnlen` wrapper which is a `#define` on all platforms except on MinGW. Also, this has a quick little MinGW implementation for `p_strnlen()` which should get the job done.