Fix $.isObject() and condition in attr()

This allows $(selector).attr('attribute', null) to correctly
remove an attribute from a collection of elements.

Fixes https://github.com/01org/appframework/issues/349