Merge branch 'release-0.5.6' into dev
bump version number to 0.5.7-dev
(ocaml) Add example of using Piq as a config file format
(ocaml) Add another custom type example

An example of how to map OCaml's string Map.Make(String).t to list of {key,
value} records in Piqi.
(ocaml) Fix incorrect "piqic ocaml-ext" output when used w/o --pp flag

The generated <Mod>_piqi.ml was overwritten with the contents of
<Mod>_piqi_ext.ml when "piqic ocaml-ext" was called without "--pp" flag.
Improve command-line help messages
(erlang) Fix incorrect -specs
Add more info about "piqi-erlang" rebar package
(erlang) Make edoc work without errors
(piqi) Native representation of Piqi defaults in JSON and XML

Before this change, default values in Piqi field definitions were represented as
serialized Piq AST when .piqi was converted to JSON or XML formats.

Now, they are converted to their direct JSON and XML representations which are
typed according to the field's type.
(piqi) Better Piqi self-definition layout

Piqi self-definition is now split into two parts: Piqi-spec and Piqi-lang which
is a superset of the former. Basically, Piqi-lang = Piqi-spec + includes and
extensions.
(piqi) More robust handling of defs derived from functions parameters

Type definitions derived from function parameters can not be used in other type
definitions.
(piqi) Serialize .piqi as piqi-spec instead of piqi-lang

When serializing .piqi to JSON, XML or PB, automatically expand it by resolving
includes and extensions.

By doing this, we ensure that the full .piqi specification will be available to
those who want to work with it using languages other than OCaml.

Resolving extensions and includes is necessary, because there is no convenient
way to represent Piqi extensions in those formats (serialized Piq ast doesn't
make a lot of sense to users). In addition, not having to deal with includes
makes working with Piqi specs really easy and straighforward.
Better JSON-encoding for flags

Flags, i.e. fields and options without associated values, were previously
encoded as

        <name>: null

This commit changes their representation to

        <name>: true

This is conistent with how flags are represented in binary format. It is also
more reliable this way.

This is a backwards-incompatible change.
(piqi) Fix "piqi to-proto" for function parameters

Protobuf messages where not generated for function parameters of primitive
types, e.g. string, int, float, etc.
(piqi getopt) Add field defaults to JSON or XML output

Add default field values to the output records, when JSON or XML output formats
are specified (i.e. piqi getopt -t json|xml).

With this change, "piqi getopt" behavior becomes consistent with the rest of
Piqi funcionality (e.g. "piqi convert").
(piqi,erlang,ocaml) Add support for including JSON "null" fields

By default, missing optional fields are omitted from JSON output. This
change introduces an option that allows to explicitly specify wither
to omit or include such fields when converting or serializing data
structures to JSON format.

When the option is turned on, missing optional fields will look like
this:

        {"field":null}

For "piqi convert", a new "--json-omit-null-fields true|false" option
was added.

For Erlang, a new "gen_<typename>/3" function is generated in
"*_piqi_ext.erl" files. The third parameter is a list of options. One
of the available options is {json_omit_null_fields, true|false}.

For OCaml, a new optional "opts" parameter is added to the
"gen_<typename>" functions in "*_piqi_ext.ml" files. The "opts"
parameters can be constructed by calling
"Piqirun_ext.make_options ... ()". For example:

        Piqirun_ext.make_options ~json_omit_null_fields:false ()
Fix build with OCaml 3.11
(piqi,erlang,ocaml) Take last field out of several when reading Protobuf

In Protocol Buffers binary format, fields defined as "required" or "optional"
can be present in the encoded record more that one time. The new behavior is to
take the last entry as the field's value (rather than taking the first).

The reason for this change is to follow Protocol Buffers specification more
closely.
(piq) Make :piqtype directive optional in .piq files

There was an artificial restriction that :piqtype directive (specifying default
object type) should always be present in .piq (and .wire) files.

This change removes the restriction and allows the default object type to be
specified as "--piqtype" command-line parameter for "piqi convert" and "piqi
check".

When Piqi is used as OCaml or Erlang data serialization system, types for loaded
Piq objects are known up-front and explicit :piqtype directive is not necessary.

Overall, always enforcing :piqtype presense was reducing flexibility and causing
unnecessary redundancy.