fixed remove() to get rid of removed element refs

removes from $self and from all $self->{before}.

Also modified how each() instantiates the objects, so $_->end works in the callback, which is needed for $_->remove() to work in the callback.
Merge pull request #12 from cafe01/removebug

fixed remove() to get rid of removed element refs