add potion_class_type: adds vt->type to the API

struct PNVtable is only defined in table.h, not exported.

The workaround was to use:
  PNType type = PN_FLEX_SIZE(P->vts) + PN_TNIL;
  PN vt = potion_class(P, 0, 0, 0);
Now it is:
  PN vt = potion_class(P, 0, 0, 0);
  PNType type =  potion_class_type(P, vt);
which can be made thread-safe much easier
aio: use potion_class_type