Reformatted code according to google-cpp style guidelines.

1. Formatted .cc and .h files according to google cpp style guide.
2. Changed boost required version to 1.54
3. Fixed the warning on const correctness.