changes parser so that 'class' can be an object key (which is common in backbone.js apps)
adds tests for objects with keys named 'class'
fixes #258
fixes #259