Rename api.get_definitions to defined_names

Do the same for Definition.get_definitions also.