BUG-994: improve CopyUtils performance

Instead of copying schemapath's components and juggling with them, use
the new utility functions to instantiate the paths more efficiently.

Change-Id: I86dca53150b46f25de8c5261c17332e9ee5d8533
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-994: introduce SchemaPath.getLastComponent()

As it turns out we access the last component quite frequently. Let's
just expose it to the users, so they do not have to go through hoops to
find it.

Change-Id: I434f729f08196ad768e9326ffdc1cf9409ea8f07
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "BUG-994: improve CopyUtils performance"
Merge "BUG-994: introduce SchemaPath.getLastComponent()"