merge with google svn patch

there are 5 another commits at all.
I make patches and apply they.
Only makefiles generate conflicts.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/tetsuok/giza-pp/1)
<!-- Reviewable:end -->