Gets rid of redundant double check for string type. Also remove obsolete declaration of mp_obj_str_get_hash.