fixed bugs in remove_group and move_group functions

Changed remove_group to properly delete all child groups and entries. No longer raises Orphaned entries exception. Also changed move_group to allow groups to have Root as parent without raising an error and to reset the level of the moved group and its child groups properly.