Added to_str() method for HashMap and HashSet

Implemented to_str() for HashMap and HashSet
Added tests.
Minor formatting and stylistic cleanups.