Added a pre-commit hook to check style.

Review: https://reviews.apache.org/r/21439