Fix check for 'Node->storeNewParent()'. Fixes #79 and closes #81.

This will avoid moving the node when setting 'parent_id' to null and node is already root.
Merge branch 'fix-nullify-parents' into develop
Add pessimistic locking. Closes #89.

Use pessimistic locks when performing certain operations which
may result in a race condition. Mainly:

+ When moving nodes (updates bounds and depth for whole subbranches).

+ While looking for rightmost node (at every node creation) which may
result in some error, mainly if it gets updated while doing this.

+ When pruning whole subtrees.
Merge branch 'add-row-locks' into develop