Introduce HashCodeBuilder

This patch moves HashCodeBuilder, and internal yang-binding utility
class, into the util package and make it public.

The class was originally used to incrementally create InstanceIdentifier
hash code. As it turns out, we have at least two other potential users,
who could benefit from that same pattern: SchemaPath and the data-api
InstanceIdentifier, since they really are just different views on the
same concept.

Change-Id: I6a3208de213a47a2ed98e64f73a883dca73034fc
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-582: pre-cache Pattern instances

In a few places we did not cache the regex patters we used, resulting in
sub-optimal performance. This patch corrects that, moving them as close
to being static as possible.

Change-Id: I5edb8c1f33dff9178a0101fbb8fa71a6a3237aab
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "Introduce HashCodeBuilder"
Merge "BUG-582: pre-cache Pattern instances"