common: Introduce a simpler interface of packet serialization

This commit introduces new functions "build" in the packet serialization
framework. This functions returns a serialized buffer by value, unlike
"serialize" which takes it by reference. This makes it possible to write
simpler code, e.g.:

  std::vector<uint8_t> serializedPacket;
  cstoma::someMessage::serialize(serializedPacket, val1, val2);
  masterconn_create_attached_packet(eptr, serializedPacket);

can be written as:

  masterconn_create_attached_packet(eptr, cstoma::someMessage::build(val1, val2));

It also makes it possible to use auto instead of std::vector<uint8_t> in
many places, e.g.:

  std::vector<uint8_t> request, response;
  cltoma::someMessage::serialize(request, val1, val2);
  response = connection.sendAndReceive(request, LIZ_MATOCL_CHUNKS_HEALTH);

can be written as:

  auto request = cltoma::someMessage::build(val1, val2);
  auto response = connection.sendAndReceive(request, LIZ_MATOCL_CHUNKS_HEALTH);

This commit also refactors many places in the code where such
a temporary buffers were used. These places were located using:

  grep . -Inr src/ |
    awk '/std::vector.uint8_t/ {vec=10} /::serialize/ && vec>0 {print} {vec--}'

Change-Id: Ic07b6b6234cd80fc2abf9e81061a3bb52f2b471c