Make encoding.serialize() more programmatical

Introduce `serializable_fields` to express which class attributes
to be serialized.

Get rid of OrderedDict. Just replacing it with regular dict.

Change-Id: I3f7639dab171d3d62e92d0d1bb6d7b071cf963ad
Switch to oslo.config for CLI parsing

Use oslo.config instead of argparse for CLI parsing. As a side effect,
a bunch of logging arguments including --debug become available with
this change.

Change-Id: Ia8c4e91448f2a8cb15eb570125ac9c236e13274c
Merge "Switch to oslo.config for CLI parsing"
Merge "Make encoding.serialize() more programmatical"