merge Ruby r40220

* regint.h: fix typo: _M_AMD86 -> _M_AMD64.
[bug] fix problem with optimization of \z (Issue #16)

"こんにちは" =~ /\n?\z/ didn't match.

see:
  http://bugs.ruby-lang.org/issues/8210
  http://stackoverflow.com/a/15885857/925913
[dist] update testpy.py

Add tests for the Issue #16.
update HISTORY
Merge branch 'topic/fix-endbuf-optimization'