Fix the managed memory planning after patch 9ce6293075d1a2326df8a2e99c032445a555b28b
Fix checkstyle errors and various warnings.
Add "How to contribute" and "coding guidelines" to the project.

[ci skip]