Use a better way to deal with variable-size protocol headers

A previous commit that reduces garbage in the lib/protocol code broke
the handling of variable-sized protocol headers, specifically gre.
The gre code and the generic code in lib/protocol/header.lua has bee
rewritten to use subclasses in such a case.  This makes the code
cleaner and allows proper recycling of objects on a per header-type
basis.