fix failure of strrchr(str, 0) bug report and solution by Richard Pennington
implement memrchr (nonstandard) and optimize strrchr in terms of it
initial check-in, version 0.5.0