libipt, all: hide encoder

Hide details of the packet encoder and provide a single encode function that
takes a struct pt_packet.  Update pttc to use that encode function.

The encoder is implicitly tested with .ptt tests.  This will be extended to
unit tests in subsequent patches.

We keep the old encode functions as long as they are used in unit tests.

Change-Id: I6ab3970abb973563a84bdeb2a3049b4a90d8f200
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>