ID and frame metadata field cleanup

Convert ID fields from unsigned int to long to avoid mask comparisons.
Extract common frame metadata fields in http/2 reader.