Another attempt at fixing $.fn.html()

The previous attempt resulted in a strange problem where simply calling
html() would return a jQuery element. While I'm not sure how this could
happen, switching back to using apply and just being careful to check
against undefined fixes all the cases.