adding .last to the last th and td

This is needed in order to allow styling if the last column is hidden
(which won't work using :last-child).

You can see this problem when scaling the demo.htm down to the phone
breakpoint. The top-right and lower-right corners will not have the
correct border-radius applied.

Not sure if the JS-part is the most effective performance-wise … but it
works fine for me.