qapi: qapi_visit.py, support generating static functions

qidl embeds visitor code into object files rather than linking against
seperate files, so allow for static declarations when we're using
qapi_visit.py as a library as we do with qidl.py

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
qapi: qapi_visit.py, support for visiting non-pointer/embedded structs

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
qapi: add visitor interfaces for C arrays

Generally these will be serialized into lists, but the
representation can be of any form so long as it can
be deserialized into a single-dimension C array.
qapi: QmpOutputVisitor, implement array handling
qapi: QmpInputVisitor, implement array handling
qapi: qapi.py, make json parser more robust

Currently the QAPI JSON parser expects a very particular style of code
indentation, the major one being that terminating curly/square brackets are
not on placed on a seperate line. This is incompatible with most
pretty-print formats, so make it a little more robust by supporting
these cases.
qapi: add open-coded visitor for struct tm types

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
qom-fuse: force single-threaded mode to avoid QMP races

python-fuse defaults to multi-threaded handling of filesystem calls.
In the case of QOM this can lead to threads reading QMP responses to
requests executed by other threads, causing all sorts of strangeness
when interacting with QOM mounts. For instance:

  mdroth@loki:~/w/qom$ ls -l machine | grep type
  ls: error while loading shared libraries: tls/libacl.so.1: \
  cannot read file data: Error 21

We fix this by unconditionally passing in the -s option, which forces
single-threaded/serialized execution of filesystem calls. This flag is
only honored if we pass dash_s_do='setsingle' to the Fuse class
constructor and use the parse() method of that class to pass in
arguments, so we do that here as well.
qom-fuse: workaround for truncated properties > 4096

We currently hard-code property size at 4096 for the purposes of
getattr()/stat()/etc. For 'state' properties we can exceed this easily,
leading to truncated responses.

Instead, for a particular property, make it
max(4096, most_recent_property_size * 2). This allows some
head-room for properties that change size periodically (numbers,
strings, state properties containing arrays, etc)

Also, implement a simple property cache to avoid spinning on qom-get
if an application reads beyond the actual size. This also allows us
to use a snapshot of a single qom-get that persists across read()'s.
Old Cache entries are evicted as soon as we attempt to read() from
offset 0 again.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
module additions for schema registration

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: move Property-related declarations to qdev-properties.h
qidl: add documentation
qidl: add lexer library (based on QC parser)

Adds an abstract Lexer class to handle tokenizer via a
peek/pop/peekline/popline interface, along with an implementation for C
based on the lexer from qc.git
qidl: add C parser (based on QC parser)

This introduces the QIDL parser to process QIDL annotations in C files.
This code is mostly a straight import from qc.git, with some reworking
to handle the declaration/annotation format and lexer we're using for
QEMU.
qidl: add QAPI-based code generator

This takes the declarations generated by the QIDL parser and converts
them to QAPI schemas to generate the visitor routines and other
supporting code for QIDL.
qidl: qidl.h, definitions for qidl annotations
qidl: unit tests and build infrastructure
qemu-timer: add visit_type_QEMUTimer
rtc: add QIDL annotations and state properties
i440fx: add QIDL annotations and state properties

We also add annotations for embedded VGACommonState/PCIDevice structs
to serialize inherited/guest-volatile data such as PCI config space
and msix tables.