Added utilities.getType function for determining types of objects.
Added utilities.isEntity and utilities.isSet, and made utilities.getType use them.
Changed order of type checks to allow for detecting sets before arrays. This fixes a bug that makes sets show as arrays.
Added a simple set.toString.
Made s.toString more intuitive, and more consistent with the new set.toString.