Fix Jasmine tests for JSInput

This fixes broken tests and the fixture for JSInput.

The tests were using incorrect CSS selectors, so `jQuery.each` was always iterating over an empty list and never making the proper assertions.  Fixing this exposed additional errors, which have also been addressed.

More detailed information can be found in the messages of the individual commits.