src: Improving consistency and correcting code style

As of this commit, all data structures can be directly constructed from
wire format.

This commit excludes full correction of code style in security/ and
tools/ndnsec*, which will be part of a different commit.

Change-Id: I121ac1f81948bc7468990df52cdefeb2988d91a1
Refs: #1403
tools: Adjust ndnsec-cert-gen behaivor

Refs: #1484

Change-Id: Id33a2881cc7a4c9acdd16999e80be7d79c63d650