Updates for traversal methods.

Fixed bug where after() was appending an element at the end of a
collection.
Refactored prev() to accept a selector as filter.
Refactored next() to accept a selector as filter.