Bug 2328: Change ensureParent algorithm.

EnsureParents algorithm has two different implementations
with small buggy differences in behaviour - one was used in
Legacy API always used merge operation for each and every
parent node and also user written node.

New Data Broker API implementation used algorithm which
used merge operation only for nodes, which did not existed
in transaction, but this triggered createParents=true
to fail, if parent node was deleted in concurrent transaction
which finished earlier.

Unified this implementations into one in abstract class:
merge is used always for each parent node, except
writen node which is already supplied by client of API.

New algorithm does not need to do read from transaction
which makes this transaction faster during creation time,
but with smaller performance penalty at commit time.

Change-Id: I0fb9f8d4e77648739673566729984e1ecb1e5146
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Merge "Bug 2328: Change ensureParent algorithm." into stable/helium