Handle VCD single-bit shortnames

VCD files apparently have a syntax feature in which a shortname can
refer to a single bit inside a larger multi-bit signal. VCD files
produced by ModelSim use this syntax. This commit adds support for that
into libvcd and vcddiff.

Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Add a missing <stdlib.h> for OSX