Proper hashCode() signatures for HGNode and DPState.

Replaced String-based signatures with an inner Signature meta-object that hashCodes() and equals() according to the lhs-and-state semantics as intended. This fixes #96.