Bugfix package import

There was an issue when importing the same node again with
changed package set. This patch fixes this. Packages no longer
associated with the node are removed from the nodes package index.
New packages are added to the package list and linked to the node.

Test cases updated

Signed-off-by: Christoph Kassen <c.kassen@telekom.de>