Fixed check for table layout in formset js

Fixed check for table layout, so that the add button is actually wrapped within a tr and td tag if appropriate.

Currently the plugin attempts to check for the tagName on the jQuery object (which will always return undefined), now it uses the jQuery "is" method.