Improve contracts for Set

Similar to how it has been done to Dict, functions in the
Set are polymorphic but Set implementations should not provide
polymorphic functions.

This reduces the duplication inside each set implementation
and provides both strict and polymorphic interfaces.
Improve coverage for Set and Dict with mixed types