visit and select all nodes according to selectedNodes

when the selectedNode watch is fired, we visit all tree nodes and check
if the node is contained in the selectedNodes array. If so we select it.
Since this fires the dynatree onSelect listener which adds node the
selectedNodes array, we there need to check if the node is already
contained in the selectedNode array to avoid multiple items in the
selectedNodes array
fixed #14