Refactored set to use keys not values of array for huge speed increase

Array keys naturally behave as sets, so a lot of operations are faster or simpler if you use the keys rather than the values.

Stop keeping track of size, use count()
Keep set values as keys of array, not as values