BUG-582: optimize TypeProviderImpl

This just replaces obvious string misuses with more-performant
replacements.

Change-Id: Ib8fe7a3a40e3fe9fa78d3eec2f83c1341040a937
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-582: improve SchemaPath.hashCode()

SchemaPath.hashCode() is currently the hottest hashCode of immutable
objects. SchemaPath has similar uses as the BA InstanceIdentifier, where
we use hash code caching.

This patch introduces such caching. It also prevents list duplication
when we do not need to copy the entire list.

Change-Id: I5a8fe845ebb50308fde7fc766970f81ea706c203
Signed-off-by: Robert Varga <rovarga@cisco.com>