Making sure 'set' produces a truly immutable object

I've tried to make the change as minimally invasive as possible, but please feel free to alter the code to your style, because some things (like the keys-filter-forEach one-liner) look kinda ugly but work.

All of the tests are now passing and it's impossible to alter a set!