Memory leak and NULL dereference fixes.

PR#3403
Fix OID encoding for one component.

OIDs with one component don't have an encoding.

PR#2556 (Bug#1)
Rebuild OID table.
test/testutil.h test registry macros

These help standardize the structure of main() and result reporting.
Use testutil registry macros in heartbeat_test