choosing find() xpath root based on whether node has parent

we can get rid of $self->{root}, and find() will do the right thing.

So now we can write a detach() method like this:

    sub detach {
        my ($self) = @_;
        $_->detach for @{$self->{trees}};
        #$self->{root} = '/'; # this line would be necessary in the current find() implementation
        $self;    
    }

That being said, I think the correct behavior is to always use the $tree as the root for $tree->findnodes(), but include it in the search. I'm wondering if this is a limitation (or bug, or feature) of $tree->findnodes(), or xpath itself. :/

Btw, do you want PR for those (jquery compatible) methods I'm implementing in my subclass? 

So far I got those:
* append
* prepend
* after
* before
* insert_after
* insert_before
* detach
* add_class
* remove_class
* has_class

Thanks for attention.