[Refactoring] Add 'collapsed' and 'selected' as the attributes of 'node' model

Move these attributes from scope to model. Status should be saved in model
not in scope.