feat(jqLite): implement the `detach` method

Closes #5461