Updated `bringToFront`

In beta 7, `self.parent` became a normal optional, not explicitly unwrapped. This causes the constant `parent` to be an optional. This new implementation handles the case where the node does not have a parent, and prevents having to explicitly unwrap later on.