Fix the portability implementation of strndup
Summary:It was mistakenly assuming the length passed in included the null terminator.
This also makes the portability implementation of `strndup` available to OSX and FreeBSD, where they weren't present, and where HHVM had a wrapper for them.
This also removes the extra pair of conditions around `memrchr`, as the main define should always be getting set.
Reviewed By: yfeldblum
Differential Revision:
D3116467
fb-gh-sync-id:
243dd4dace219efab2c2bf2f383202e70fbec4de
fbshipit-source-id:
243dd4dace219efab2c2bf2f383202e70fbec4de