protbuf: Add Protocol Buffers (PB) helpers v4

To not bloat util.h or image.h the protobuf.h introduced to
handle all PB needs.

We represent our PB objects as pairs of records

  | 4 bytes for object packed size
  +---
  | X bytes -- object itself

v3:
 - Use plain read/write calls
 - Use local buffers for small objects

v4:
 - Add pb_pksize helper to calculate object
   size with header

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Start switching our image entries to Google's protobuf

A short story -- there were a long conversation on which format should
be used to keep checkpointed data on disk image. We ended up in using
Google's Protocol Buffers (see https://developers.google.com/protocol-buffers/
for detailed description). Thus image entries should be convered to PB.

This patch converts fdinfo_entry to PB "message fdinfo_entry".

Build note: one should have protobuf and protobuf-c installed to be able
to build crtools.

 - http://code.google.com/p/protobuf/
 - http://code.google.com/p/protobuf-c/

Inspired-by: Kinsbursky Stanislav <skinsbursky@openvz.org>
Inspired-by: Pavel Emelianov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Use RegFileEntry instead of reg_file_entry structure v3

This patch switches reg_file_entry structure with RegFileEntry
protobuf entry. Note that there a few nits remains

 - old fown_t structure doesn't scale well with FownEntry from
   RegFileEntry, so to not mess with rest of crtools code
   I've added a couple of opencoded copy operands, will clean
   this aspect up once rest of code is converted

 - the "show" procedure doesn't print fown for same reason

v2:
 - rename fown_t to fown_entry in .proto
v3:
 - don't print nil symbol on show

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Use GhostFileEntry instead of struct ghost_file_entry

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Use FifoEntry instead of struct fifo_entry

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Use RemapFilePathEntry instead of struct remap_file_path_entry

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Add more detailed comment on generic typdefs used in code

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Use EventfdFileEntry instead of struct eventfd_file_entry

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Convert eventpoll data to protobuf engine

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Convert inotify data to protobuf engine

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Convert struct fs_entry to PB engine

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Convert pstree_entry to PB engine

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
pipes: Use pipe_entry as a reference in pipe_info

Need it for PB transition.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Convert pipe_entry to PB engine

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
pipes: Use pde as a reference in pipe_data_rst

Need it for PB transition.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf: Convert struct pipe_data_entry to PB engine

Note, at moment we don't use "data" from proto declaration,
it's reserved to implement later (simply because it's easier
to use current code for a while).

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
sockets, unix: Use unix_sk_entry as a reference in unix_sk_info

For PB transition.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
unix update

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
protobuf.h update

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>