New code style guidelines

Reformat all code according to new guidelines and add c.astylerc and
java.astylerc for formatting.