Remove broken strtok_r macro from pthreads and implement real version

The existing strtok_r macro which wraps around strtok will simply not
work since strtok will keep state information internally. Copy
implementation from BSD.
(cherry picked from commit 9488f917d4008775041280abea5fd6263dca79e8)
Regenerate Makefile.in
Remove ifdef checks for strtok_r
(cherry picked from commit 21b701af1fbfd076638ac61c65370f22ee038378)
Undefine strtok_r on prototyping.  by this user-define remains valid.
(cherry picked from commit 2beed4dd5d2af6f0dca10ece1f83dc6abe8904c6)