qidl: add QEMU IDL processor

This is an import of Anthony's qidl compiler, with some changes squashed
in to add support for doing the visitor generation via QEMU's qapi code
generators rather than directly.

Documentation has been imported as well, as is also viewable at:

https://github.com/aliguori/qidl/blob/master/qc.md

This will be used to add annotations to device structs to aid in
generating visitors that can be used to serialize/unserialize them.
qidl: add qc definitions

Define away the annotations so we can still compile.
qapi: add visitor interfaces for arrays
qapi: QmpOutputVisitor, implement array handling
qapi: qapi-visit.py, support arrays and complex qapi definitions

Add support for arrays in the code generators.

Complex field descriptions can now be used to provide additional
information to the visitor generators, such as the max size of an array,
or the field within a struct to use to determine how many elements are
present in the array to avoid serializing uninitialized elements.

Add handling for these in the code generators as well.
qapi: qapi-visit.py, add gen support for existing types

For qidl-annotated devices, we generate visitors for existing types,
rather than defined the types via qapi. Modify qapi-visit.py so that we
can pass it a header containing the type definition rather that having
it expect a generated one.
qapi: add open-coded visitors for QEMUTimer/struct tm types

These are common types that don't lend themselves to script-generated
visitors and require special handling. These will be useful for device
state serialization.
rtc: move RTCState declaration to header

We need these definitions in a header file since the generated visitors
need to know the struct definitions to do their job. This also reduces
the amount of code we need to feed into the QIDL compiler once we
annotate it.
rtc: add qc annotations

Add our annotations according to QIDL documentation.
Makefile: add infrastructure to incorporate qidl-generated files

This will rebuild the qidl-generated qapi schemas in
$(SRC_DIR)/qidl-generated whenever we do a build where of the annotated
sources has been modified. As a result, changes will be reflected in the
working tree so we can detect changes and commit them in cases where the
changes are correct/expected.

We also add the necessary targets for compiling and linking in the
qapi-generated visitors for device state.

RTC is the first user.
qapi: add qidl-generated qapi schema for rtc
rtc: add a QOM property for accessing device state

This will eventually be used to serialize device state for the purposes
of migration/savevm, and is also useful for introspection/testing.
rtc: add _version() qidl annotations

VMState relies on per-field versioning in some cases. We don't use this
for serialization, but it is needed for proper generation of VMState
field decriptions.
qidl: add qidl-based generation of vmstate field bindings

Add support for generating VMState field bindings/descriptions based on
QIDL annotations. Use a look-up table with hard-coded fields for cases where
we can't rely infer it from QIDL. These hard-coded fields will be quite
numerous, but the majority of fields should be coverable, and as such will
allow for automatic detection of migration changes for a broad swath of
device state.

And we almost get these for free from the serialization annotations so why
not.
Makefile: add qidl-generation of vmstate field descriptions

This will rebuild the vmstate descriptions in
$(SRC_DIR)/qidl-generated whenever we do a build where one of the
annotated sources has been modified. As a result, changes will be
reflected in the working tree so we can detect changes and commit
them in cases where the changes are correct/expected.
qidl: add qidl-generated vmstate fields for rtc

Initial check-in of the qidl-generated vmstate fields for rtc.
rtc: use qidl-generated vmstate bindings

Make use of the qidl-generated vmstate bindings