Some fixing

fix _ensure_slug in api, and raise exception if slug is not in plugin objects. override __hash__ of Plugin objects